-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makeconf
28 lines (21 loc) · 1007 Bytes
/
Makeconf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
WORKBENCH_BASE ?= .
ARCH ?= core2
CPUS ?= $(shell case `uname` in (Darwin) ioreg | fgrep -c ' AppleACPICPU ' ;; (Linux) grep -c ^processor /proc/cpuinfo ;; esac)
# a compiler with blocks support is required
CC = clang
override CPPFLAGS := $(if $(DEBUG),-DDEBUG,) -DTHREADS=$(CPUS) $(CPPFLAGS)
override CPPFLAGS := -isystem "$(shell sdl-config --prefix)/include/SDL" $(CPPFLAGS)
override CPPFLAGS := -isystem "$(realpath FFmpeg)" -isystem "$(realpath ../FFmpeg)" $(CPPFLAGS)
override CPPFLAGS := -I"$(realpath .)" "-I$(realpath Components)" $(CPPFLAGS)
unexport CPPFLAGS
override CFLAGS := $(if $(DEBUG),-g -O0,-Ofast) $(CFLAGS)
override CFLAGS := -march=$(ARCH) -fblocks -std=c99 $(CFLAGS)
override CFLAGS := -Weverything $(CFLAGS)
unexport CFLAGS
override LDFLAGS := -pthread -lm -ldl $(LDFLAGS)
unexport LDFLAGS
ifeq ($(shell uname),Linux)
override CPPFLAGS := -D_GNU_SOURCE $(CPPFLAGS)
override LDFLAGS := -ldispatch -lBlocksRuntime -lrt $(LDFLAGS)
endif
-include $(WORKBENCH_BASE)/Makeconf.local