-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile.apple
executable file
·48 lines (33 loc) · 1.29 KB
/
makefile.apple
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# pixeltoaster makefile for apple
# use the default SDK
sdk =
# Uncomment the next line if you want to build your binary on 10.5 Leopard, but want to run it on 10.4 Tiger
#sdk = -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
# build 32-bit native only
archs =
# to build universal binaries use:
#archs = -arch i386 -arch ppc
# when building for 10.5 Leopard you can use the following instead to build 4-way universal binaries
#archs = -arch i386 -arch x86_64 -arch ppc -arch ppc64
flags = -O3 -Wall $(sdk) $(archs)
ldflags = -framework CoreServices -framework Cocoa -framework OpenGL
examples := $(patsubst Example%.cpp,Example%,$(wildcard Example*.cpp))
headers := $(wildcard PixelToaster*.h)
corefiles := PixelToaster.cpp PixelToasterApple.mm
coreobjs := PixelToaster.o PixelToasterApple.o
all : $(examples)
$(coreobjs) : $(corefiles) $(headers) makefile.apple
g++ -c $(corefiles) $(flags)
% : %.cpp ${headers} ${coreobjs} makefile.apple
g++ $< ${coreobjs} ${flags} ${ldflags} -o $@
documentation : PixelToaster.h ${headers} doxygen.config
doxygen doxygen.config
docs : documentation
.PHONY: test
test : Test
./Test
.PHONY: profile
profile : Profile
./Profile
clean:
rm -rf $(examples) $(coreobjs) Test Profile documentation