diff options
author | Rasmus Andersson <rasmus@notion.se> | 2018-09-06 04:45:23 +0300 |
---|---|---|
committer | Rasmus Andersson <rasmus@notion.se> | 2018-09-06 04:45:23 +0300 |
commit | fc1ac6b4e28260be8ee3e6f8b3bec37678cca594 (patch) | |
tree | b9c0bcfb741b5149bd7ccb1a59499a247aa95fa8 /misc/tools/fontsample/Makefile | |
parent | 3a38dd4737471501b136b76255ef13854c4ba5d0 (diff) | |
download | inter-fc1ac6b4e28260be8ee3e6f8b3bec37678cca594.tar.xz |
housekeeping of misc folder
Diffstat (limited to 'misc/tools/fontsample/Makefile')
-rw-r--r-- | misc/tools/fontsample/Makefile | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/misc/tools/fontsample/Makefile b/misc/tools/fontsample/Makefile new file mode 100644 index 000000000..063d7262d --- /dev/null +++ b/misc/tools/fontsample/Makefile @@ -0,0 +1,44 @@ +sources = fontsample.mm + +CC = clang +CXX = clang +LD = clang + +XFLAGS := -Wall -g -fno-common +CFLAGS += -std=c11 +CXXFLAGS += -std=c++11 -stdlib=libc++ -fno-rtti -fno-exceptions +LDFLAGS += -lc++ + +#flags release and debug targets (e.g. make DEBUG=1) +ifeq ($(strip $(DEBUG)),1) + XFLAGS += -O0 +# else +# XFLAGS += -Os -DNDEBUG +endif + +libs := -lobjc +frameworks := -framework Foundation \ + -framework CoreText \ + -framework CoreServices \ + -framework CoreGraphics \ + -framework ImageIO + +c_flags = $(CFLAGS) $(XFLAGS) -MMD -fobjc-arc +cxx_flags = $(CXXFLAGS) $(XFLAGS) -MMD -fobjc-arc +ld_flags = $(LDFLAGS) $(libs) $(frameworks) + +objects := $(sources:%.c=%.o) +objects := $(objects:%.cc=%.o) +objects := $(objects:%.mm=%.o) + +fontsample: $(objects) + $(LD) $(ld_flags) -o $@ $^ + +%.o: %.mm + $(CXX) $(cxx_flags) -c $< + +clean: + rm -f *.o + +all: fontsample +.PHONY: all clean |