74 lines
1.6 KiB
Makefile
74 lines
1.6 KiB
Makefile
#-----------------------------------------------------------------------------
|
|
# Makefile for Final Cut
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# This is where make install will install the executable
|
|
BINDIR = /usr/local/bin
|
|
|
|
# compiler parameter
|
|
CXX = clang++
|
|
CCXFLAGS = $(OPTIMIZE) $(PROFILE) $(DEBUG) -march=x86-64 -frtti -fexceptions
|
|
MAKEFILE = -f Makefile.clang
|
|
LDFLAGS = -L../src -lfinal
|
|
INCLUDES = -I../src
|
|
RM = rm -f
|
|
PROGS = hello dialog input-dialog fstring timer ui
|
|
OBJS1 = hello.o
|
|
OBJS2 = dialog.o
|
|
OBJS3 = input-dialog.o
|
|
OBJS4 = fstring.o
|
|
OBJS5 = timer.o
|
|
OBJS6 = ui.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 $(PROGS)
|
|
|
|
hello: $(OBJS1)
|
|
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o hello $(OBJS1)
|
|
|
|
dialog: $(OBJS2)
|
|
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o dialog $(OBJS2)
|
|
|
|
input-dialog: $(OBJS3)
|
|
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o input-dialog $(OBJS3)
|
|
|
|
fstring: $(OBJS4)
|
|
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o fstring $(OBJS4)
|
|
|
|
timer: $(OBJS5)
|
|
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o timer $(OBJS5)
|
|
|
|
ui: $(OBJS6)
|
|
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o ui $(OBJS6)
|
|
|
|
debug:
|
|
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -W -Wall -Weverything -Wpadded -pedantic"
|
|
|
|
profile:
|
|
$(MAKE) $(MAKEFILE) PROFILE="-pg"
|
|
|
|
.PHONY: clean dep
|
|
clean:
|
|
$(RM) $(PROGS) $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJS5) $(OBJS6) .depend *.gch *.plist *~
|
|
|
|
dep:
|
|
$(CXX) -MM $(INCLUDES) *.cpp >.depend
|
|
|
|
#
|
|
# include .depend if it exists
|
|
#
|
|
|
|
-include .depend
|