finalcut/test/Makefile.gcc

82 lines
1.8 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
2015-06-08 20:42:17 +02:00
PROGS = hello dialog input-dialog mandelbrot calculator fstring timer ui
2015-05-24 19:15:03 +02:00
OBJS1 = hello.o
OBJS2 = dialog.o
OBJS3 = input-dialog.o
2015-05-25 23:39:09 +02:00
OBJS4 = mandelbrot.o
2015-06-08 20:42:17 +02:00
OBJS5 = calculator.o
OBJS6 = fstring.o
OBJS7 = timer.o
OBJS8 = ui.o
2015-05-23 13:35:12 +02:00
ifdef DEBUG
OPTIMIZE = -O0
else
OPTIMIZE = -O2
endif
.SUFFIXES: .cpp
# $@ = name of the targets
# $< = the first dependency
.cpp.o:
$(CXX) -c $(CCXFLAGS) $(INCLUDES) -o $@ $<
2015-05-24 19:15:03 +02:00
all: dep $(PROGS)
2015-05-23 13:35:12 +02:00
2015-05-24 19:15:03 +02:00
hello: $(OBJS1)
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o hello $(OBJS1)
2015-05-23 13:35:12 +02:00
2015-05-24 19:15:03 +02:00
dialog: $(OBJS2)
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o dialog $(OBJS2)
2015-05-23 13:35:12 +02:00
2015-05-24 19:15:03 +02:00
input-dialog: $(OBJS3)
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o input-dialog $(OBJS3)
2015-05-23 13:35:12 +02:00
2015-05-25 23:39:09 +02:00
mandelbrot: $(OBJS4)
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o mandelbrot $(OBJS4)
2015-05-24 19:15:03 +02:00
2015-06-08 20:42:17 +02:00
calculator: $(OBJS5)
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o calculator $(OBJS5)
2015-05-24 19:15:03 +02:00
2015-06-08 20:42:17 +02:00
fstring: $(OBJS6)
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o fstring $(OBJS6)
2015-05-25 23:39:09 +02:00
2015-06-08 20:42:17 +02:00
timer: $(OBJS7)
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o timer $(OBJS7)
ui: $(OBJS8)
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o ui $(OBJS8)
2015-05-23 13:35:12 +02:00
debug:
2015-06-08 20:42:17 +02:00
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic"
2015-05-23 13:35:12 +02:00
profile:
$(MAKE) $(MAKEFILE) PROFILE="-pg"
.PHONY: clean dep
clean:
2015-06-08 20:42:17 +02:00
$(RM) $(PROGS) $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJS5) $(OBJS6) $(OBJ7) $(OBJS8) .depend *~
2015-05-23 13:35:12 +02:00
dep:
$(CXX) -MM $(INCLUDES) *.cpp >.depend
#
# include .depend if it exists
#
-include .depend