Created
September 19, 2013 13:20
-
-
Save a60814billy/6623363 to your computer and use it in GitHub Desktop.
100590309 HW7 makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#makefile for 100590309 OOP HW 7 | |
UNITLITEDIR = ./CppUnitLite | |
UNITHEADER = $(wildcard $(UNITLITEDIR)/*.h) | |
UNITCPP = $(wildcard $(UNITLITEDIR)/*.cpp) | |
UNITOBJ = $(subst .cpp,.o,$(UNITCPP)) | |
HEADER = $(wildcard *.h) | |
CPP = $(wildcard *.cpp) | |
OBJ = $(subst .cpp,.o,$(CPP)) | |
LIB = -lCppUnitLite | |
LIBDIR = -L $(UNITLITEDIR)/ | |
INCLUDEDIR = -I $(UNITLITEDIR) -I ./ | |
CXX = g++ | |
CXXFLAGS = -O2 -w $(INCLUDEDIR) | |
PROGRAM = hw7 | |
.PHONY:all clean cleanObj | |
all:$(PROGRAM) | |
$(PROGRAM):cppunitlite $(OBJ) | |
$(CXX) $(CXXFLAG) -o $(PROGRAM) $(OBJ) $(LIBDIR) $(LIB) | |
$(OBJ):$(CPP) $(HEADER) | |
cppunitlite:$(UNITOBJ) | |
ar -r $(UNITLITEDIR)/libCppUnitLite.so $(UNITOBJ) | |
$(UNITOBJ):$(UNITCPP) $(UNITHEADER) | |
cleanObj: | |
rm -f $(UNITLITEDIR)/*.o *.o | |
clean: | |
rm -f $(UNITLITEDIR)/*.o $(UNITLITEDIR)/*.so *.o *.gch $(PROGRAM) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment