Advertisement
Guest User

Untitled

a guest
Dec 18th, 2014
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 0.74 KB | None | 0 0
  1. SRCDIR = ./src
  2. OBJDIR = ./obj
  3. BINDIR = ./bin
  4. INCDIR = ./inc
  5.  
  6. EXTLIB = -lboost_regex -lsqlite3 -lcrypt -lboost_system -lboost_filesystem
  7.  
  8. CC = g++
  9.  
  10. EXEC = drushgui
  11. SRC = $(wildcard $(SRCDIR)/*.cpp main.cpp)
  12. OBJ = $(addprefix $(OBJDIR)/,$(notdir $(SRC:.cpp=.o)))
  13.  
  14. CXX_FLAGS = -std=c++11 -I$(INCDIR) -Wall
  15.  
  16. all: link
  17.  
  18. .PHONY : compile
  19. compile: $(OBJ)
  20.  
  21. $(OBJDIR)/%.o: $(SRCDIR)/%.cpp
  22.     $(CC) -c $(CXX_FLAGS) $< -o $@
  23.  
  24. $(OBJDIR)/main.o: main.cpp
  25.     $(CC) -c $(CXX_FLAGS) $< -o $@
  26.  
  27. .PHONY : link
  28. link: compile
  29.     $(CC) -o $(BINDIR)/$(EXEC) $(OBJ) $(EXTLIB)
  30.     @echo
  31. .PHONY : clean
  32. clean:
  33.     @find -type f -name "$(EXEC)" -delete
  34.     @find -type f -name "*.o" -delete
  35.     @find -type f -name "*~" -delete
  36.     @echo Cleanup Complete.
  37. install: compile
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement