finalcut/test/Makefile.gcc

66 lines
1.3 KiB
Makefile
Raw Normal View History

2015-05-23 13:35:12 +02:00
#-----------------------------------------------------------------------------
# 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
OBJS0 = hello.o
OBJS1 = 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 hello ui fstring timer
hello: $(OBJS0)
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o hello $(OBJS0)
ui: $(OBJS1)
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o ui $(OBJS1)
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) $(OBJS0) $(OBJS1) $(OBJS2) $(OBJS3) .depend *~
dep:
$(CXX) -MM $(INCLUDES) *.cpp >.depend
#
# include .depend if it exists
#
-include .depend