finalcut/examples/Makefile.clang

41 lines
1.0 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 = clang++
SRCS = $(wildcard *.cpp)
OBJS = $(SRCS:%.cpp=%)
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
OPTIMIZE = -O0 -fsanitize=bool,bounds,enum,float-cast-overflow,function,null
2015-05-23 13:35:12 +02:00
else
OPTIMIZE = -O2
endif
# $@ = name of the targets
# $^ = all dependency (without double entries)
.cpp:
$(CXX) $(CCXFLAGS) $(INCLUDES) $(LDFLAGS) -o $@ $^
2015-05-24 19:15:03 +02:00
all: $(OBJS)
2015-05-23 13:35:12 +02:00
debug:
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic -Weverything -Wpadded -Wno-c++98-compat -Wno-implicit-fallthrough -Wno-reserved-id-macro"
2015-05-23 13:35:12 +02:00
profile:
$(MAKE) $(MAKEFILE) PROFILE="-pg"
.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