#----------------------------------------------------------------------------- # Makefile for Final Cut #----------------------------------------------------------------------------- # This is where make install will install the executable BINDIR = /usr/local/bin # compiler parameter CXX = g++ CCXFLAGS = $(OPTIMIZE) $(PROFILE) $(DEBUG) -march=x86-64 -frtti -fexceptions MAKEFILE = -f Makefile.gcc LDFLAGS = -L../src -lfinal INCLUDES = -I../src RM = rm -f PROGS = ui fstring timer OBJS = ui.o OBJS2 = fstring.o OBJS3 = timer.o ifdef DEBUG OPTIMIZE = -O0 else OPTIMIZE = -O2 endif .SUFFIXES: .cpp # $@ = name of the targets # $< = the first dependency .cpp.o: $(CXX) -c $(CCXFLAGS) $(INCLUDES) -o $@ $< all: dep ui fstring timer ui: $(OBJS) $(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o ui $(OBJS) fstring: $(OBJS2) $(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o fstring $(OBJS2) timer: $(OBJS3) $(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o timer $(OBJS3) debug: $(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -W -Wall -pedantic" profile: $(MAKE) $(MAKEFILE) PROFILE="-pg" .PHONY: clean dep clean: $(RM) $(PROGS) $(OBJS) $(OBJS2) $(OBJS3) .depend *~ dep: $(CXX) -MM $(INCLUDES) *.cpp >.depend # # include .depend if it exists # -include .depend