#----------------------------------------------------------------------------- # Makefile for Final Cut #----------------------------------------------------------------------------- # This is where make install will install the executable BINDIR = /usr/local/bin # compiler parameter CXX = clang++ SRCS = $(wildcard *.cpp) OBJS = $(SRCS:%.cpp=%) CCXFLAGS = $(OPTIMIZE) $(PROFILE) $(DEBUG) MAKEFILE = -f Makefile.clang LDFLAGS = -L../src -lfinal INCLUDES = -I../src RM = rm -f ifdef DEBUG OPTIMIZE = -O0 else OPTIMIZE = -O2 endif # $@ = name of the targets # $^ = all dependency (without double entries) .cpp: $(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o $@ $^ all: $(OBJS) debug: $(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic -Weverything -Wpadded" profile: $(MAKE) $(MAKEFILE) PROFILE="-pg" .PHONY: clean clean: $(RM) $(SRCS:%.cpp=%) *.gch *.plist *~