# file: $(ECE_11`11)/labs/01/l01_04/src/functs/Makefile # # revision history: # 20180821 (TD): added CDEBUGS flag, added a debug target to compile source files # into object files with debugging information # 20180820 (TD): deleted the debugging target and changed gcc-ar rvs to ar rvs # changed the debugging flag from gdb to ggdb3 # 20180803 (TD): added the debugging target to create a gdb file that contains # the debugging information for the object files # 20180724 (JP): initial version # define the object files (this must go first) # OBJ = myfuncts_00.o myfuncts_01.o # define a dummy target (this must go next) # all: $(OBJ) # define compilation, linking and archiving flags # CFLAGS += -c CDEBUGS += -g -c AR = ar rvs # define dependencies # DEPS = ../../include/myprog.h ./Makefile # define include files # INCLUDES = -I../../include/ # define a dummy target # all: $(OBJ) # define a target to make sure all source files are compiled # %.o: %.cc $(DEPS) g++ $(CFLAGS) $(INCLUDES) -o $@ $< # define a debug target # debug: g++ $(CDEBUGS) $(INCLUDES) *.cc # define a special target to install the code # install: cp myprog.h ../../include/ ar ruv ../../lib/libmyprog.a myfuncts_??.o # define a target to clean the directory # clean: rm -f myfuncts_??.o # # end of file