finalcut/examples/Makefile.clang

41 lines
1.0 KiB
Makefile

#-----------------------------------------------------------------------------
# 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
MAKEFILE = -f Makefile.clang
LDFLAGS = -L../src -lfinal
INCLUDES = -I../src/include -I/usr/include/final
RM = rm -f
ifdef DEBUG
OPTIMIZE = -O0 -fsanitize=undefined
else
OPTIMIZE = -O2
endif
# $@ = name of the targets
# $^ = all dependency (without double entries)
.cpp:
$(CXX) $^ -o $@ $(CCXFLAGS) $(INCLUDES) $(LDFLAGS)
all: $(OBJS)
debug:
$(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"
profile:
$(MAKE) $(MAKEFILE) PROFILE="-pg"
.PHONY: clean
clean:
$(RM) $(SRCS:%.cpp=%) *.gcno *.gcda *.gch *.plist *~