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++
|
2015-06-28 19:32:03 +02:00
|
|
|
SRCS = $(wildcard *.cpp)
|
|
|
|
OBJS = $(SRCS:%.cpp=%)
|
2015-08-22 18:53:52 +02:00
|
|
|
CCXFLAGS = $(OPTIMIZE) $(PROFILE) $(DEBUG)
|
2015-05-23 13:35:12 +02:00
|
|
|
MAKEFILE = -f Makefile.gcc
|
|
|
|
LDFLAGS = -L../src -lfinal
|
2017-09-17 21:32:46 +02:00
|
|
|
INCLUDES = -I../include -I/usr/include/final
|
2015-05-23 13:35:12 +02:00
|
|
|
RM = rm -f
|
|
|
|
|
|
|
|
ifdef DEBUG
|
|
|
|
OPTIMIZE = -O0
|
|
|
|
else
|
|
|
|
OPTIMIZE = -O2
|
|
|
|
endif
|
|
|
|
|
|
|
|
# $@ = name of the targets
|
2015-06-28 19:32:03 +02:00
|
|
|
# $^ = all dependency (without double entries)
|
|
|
|
.cpp:
|
|
|
|
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o $@ $^
|
2015-05-24 19:15:03 +02:00
|
|
|
|
2015-06-28 19:32:03 +02:00
|
|
|
all: $(OBJS)
|
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"
|
|
|
|
|
2015-06-28 19:32:03 +02:00
|
|
|
.PHONY: clean
|
2015-05-23 13:35:12 +02:00
|
|
|
clean:
|
2017-11-11 14:52:33 +01:00
|
|
|
$(RM) $(SRCS:%.cpp=%) *.gcno *.gcda *~
|
2015-05-23 13:35:12 +02:00
|
|
|
|