2015-05-23 13:35:12 +02:00
|
|
|
#-----------------------------------------------------------------------------
|
2018-12-22 15:33:23 +01:00
|
|
|
# Makefile for FINAL CUT
|
2015-05-23 13:35:12 +02:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# This is where make install will install the executable
|
|
|
|
BINDIR = /usr/local/bin
|
|
|
|
|
|
|
|
# compiler parameter
|
|
|
|
CXX = clang++
|
2015-06-28 19:32:03 +02:00
|
|
|
SRCS = $(wildcard *.cpp)
|
|
|
|
OBJS = $(SRCS:%.cpp=%)
|
2018-12-02 14:13:52 +01:00
|
|
|
CCXFLAGS = $(OPTIMIZE) $(PROFILE) $(DEBUG) -std=c++11
|
2015-05-23 13:35:12 +02:00
|
|
|
MAKEFILE = -f Makefile.clang
|
|
|
|
LDFLAGS = -L../src -lfinal
|
2018-09-21 06:19:25 +02:00
|
|
|
INCLUDES = -I../src/include -I/usr/include/final
|
2015-05-23 13:35:12 +02:00
|
|
|
RM = rm -f
|
|
|
|
|
|
|
|
ifdef DEBUG
|
2019-10-17 01:13:18 +02:00
|
|
|
OPTIMIZE = -O0 -fsanitize=undefined
|
2015-05-23 13:35:12 +02:00
|
|
|
else
|
|
|
|
OPTIMIZE = -O2
|
|
|
|
endif
|
|
|
|
|
|
|
|
# $@ = name of the targets
|
2015-06-28 19:32:03 +02:00
|
|
|
# $^ = all dependency (without double entries)
|
|
|
|
.cpp:
|
2020-09-25 06:16:32 +02:00
|
|
|
$(CXX) $^ -o $@ $(CCXFLAGS) $(INCLUDES) $(LDFLAGS)
|
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:
|
2019-09-08 02:04:24 +02:00
|
|
|
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic -Weverything -Wno-padded -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-implicit-fallthrough -Wno-reserved-id-macro"
|
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 *.gch *.plist *~
|
2015-05-23 13:35:12 +02:00
|
|
|
|