finalcut/test/Makefile.clang

41 lines
931 B
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=%)
2015-08-22 18:53:52 +02:00
CCXFLAGS = $(OPTIMIZE) $(PROFILE) $(DEBUG)
2015-05-23 13:35:12 +02:00
MAKEFILE = -f Makefile.clang
LDFLAGS = -L../src -lfinal
2017-02-06 02:21:40 +01:00
INCLUDES = -I../src -I/usr/include/final/
2015-05-23 13:35:12 +02:00
RM = rm -f
ifdef DEBUG
OPTIMIZE = -O0 -fsanitize=undefined
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"
2015-05-23 13:35:12 +02:00
profile:
$(MAKE) $(MAKEFILE) PROFILE="-pg"
.PHONY: clean
2015-05-23 13:35:12 +02:00
clean:
$(RM) $(SRCS:%.cpp=%) *.gch *.plist *~
2015-05-23 13:35:12 +02:00