1 src = $(wildcard src/*.c) $(wildcard src/scr/*.c) $(wildcard src/pc/*.c) \
9 #opt = -O3 -ffast-math -fno-strict-aliasing -DNDEBUG
10 def = -DMINIGLUT_USE_LIBC -DGLEW_STATIC
11 incdir = -Isrc -Ilibs -Ilibs/imago/src -Ilibs/treestore -Ilibs/glew
13 libdir = -L$(libs_path)
15 libs = $(libs_path)/libimago.a $(libs_path)/libtreestore.a $(libs_path)/libanim.a \
16 $(libs_path)/libpsys.a $(libs_path)/libminiaudio.a
18 CFLAGS = $(warn) $(dbg) $(opt) $(def) $(incdir) -fcommon -MMD
19 LDFLAGS = $(libdir) $(libsys) $(libgl) -limago -lpsys -lanim -ltreestore -lminiaudio \
22 sys ?= $(shell uname -s | sed 's/MINGW.*/mingw/')
24 obj = $(src:.c=.w32.o)
27 libsys = -lmingw32 -lgdi32 -lwinmm -mconsole
32 libgl = -lGL -lX11 -lXext
36 $(bin): $(obj) Makefile $(libs)
37 $(CC) -o $@ $(obj) $(LDFLAGS)
42 $(CC) -o $@ $(CFLAGS) -c $<
65 $(MAKE) -f Makefile.android
69 $(MAKE) -f Makefile.android clean
73 $(MAKE) -f Makefile.android libs
77 $(MAKE) -f Makefile.android install
81 $(MAKE) -f Makefile.android install run
85 $(MAKE) -f Makefile.android stop
89 $(MAKE) CC=i686-w64-mingw32-gcc sys=mingw
93 $(MAKE) CC=i686-w64-mingw32-gcc sys=mingw -C libs
97 $(MAKE) CC=i686-w64-mingw32-gcc sys=mingw clean
99 .PHONY: cross-clean-libs
101 $(MAKE) CC=i686-w64-mingw32-gcc sys=mingw -C libs clean