X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;ds=sidebyside;f=Makefile;h=0d965ed8b3aeb8197c6657c07f16acd3eccdee85;hb=6bdfcf4ad3daddcd9d689deb15798403c89ce42b;hp=c3ad83e60626abd9e7c8790702598536771513bc;hpb=aa9f7c423c8c4111b3e1d0a7bbe73e376533ed80;p=andemo diff --git a/Makefile b/Makefile index c3ad83e..0d965ed 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,21 @@ -src = $(wildcard src/*.c) $(wildcard src/pc/*.c) +src = $(wildcard src/*.c) $(wildcard src/scr/*.c) $(wildcard src/pc/*.c) libs/glew/glew.c obj = $(src:.c=.o) dep = $(src:.c=.d) bin = demo warn = -pedantic -Wall dbg = -g -#opt = -O3 -ffast-math -fno-strict-aliasing -def = -DMINIGLUT_USE_LIBC -incdir = -Isrc +#opt = -O3 -ffast-math -fno-strict-aliasing -DNDEBUG +def = -DMINIGLUT_USE_LIBC -DGLEW_STATIC +incdir = -Isrc -Ilibs -Ilibs/imago/src -Ilibs/treestore -Ilibs/glew +libs_path = libs/unix +libdir = -L$(libs_path) + +libs = $(libs_path)/libimago.a $(libs_path)/libtreestore.a $(libs_path)/libanim.a \ + $(libs_path)/libpsys.a CFLAGS = $(warn) $(dbg) $(opt) $(def) $(incdir) -fcommon -MMD -LDFLAGS = $(libsys) $(libgl) -lm +LDFLAGS = $(libdir) $(libsys) $(libgl) -limago -lpsys -lanim -ltreestore $(libc) sys ?= $(shell uname -s | sed 's/MINGW.*/mingw/') ifeq ($(sys), mingw) @@ -18,11 +23,14 @@ ifeq ($(sys), mingw) bin = demo.exe libgl = -lopengl32 libsys = -lmingw32 -lgdi32 -lwinmm -mconsole + libs_path = libs/w32 + libc = -lm else libgl = -lGL -lX11 -lXext + libc = -lm -ldl endif -$(bin): $(obj) +$(bin): $(obj) Makefile $(libs) $(CC) -o $@ $(obj) $(LDFLAGS) -include $(dep) @@ -30,6 +38,9 @@ $(bin): $(obj) %.w32.o: %.c $(CC) -o $@ $(CFLAGS) -c $< +$(libs_path)/%.a: + $(MAKE) -C libs + .PHONY: clean clean: rm -f $(obj) $(bin) @@ -46,6 +57,29 @@ libs: clean-libs: $(MAKE) -C libs clean +.PHONY: android +android: + $(MAKE) -f Makefile.android + +.PHONY: android-clean +android-clean: + $(MAKE) -f Makefile.android clean + +.PHONY: android-libs +android-libs: + $(MAKE) -f Makefile.android libs + +.PHONY: install +install: + $(MAKE) -f Makefile.android install + +.PHONY: run +run: + $(MAKE) -f Makefile.android install run + +.PHONY: stop +stop: + $(MAKE) -f Makefile.android stop .PHONY: cross cross: