X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=Makefile;h=e1332695c119bb6cfb3f0e98617868cd6ffa8974;hb=ef6f5c2822eb91ea7df55e88018f566be04ad287;hp=c3ad83e60626abd9e7c8790702598536771513bc;hpb=aa9f7c423c8c4111b3e1d0a7bbe73e376533ed80;p=andemo diff --git a/Makefile b/Makefile index c3ad83e..e133269 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -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 @@ -6,11 +6,12 @@ bin = demo warn = -pedantic -Wall dbg = -g #opt = -O3 -ffast-math -fno-strict-aliasing -def = -DMINIGLUT_USE_LIBC -incdir = -Isrc +def = -DMINIGLUT_USE_LIBC -DGLEW_STATIC +incdir = -Isrc -Ilibs -Ilibs/imago/src -Ilibs/glew +libdir = -Llibs/unix CFLAGS = $(warn) $(dbg) $(opt) $(def) $(incdir) -fcommon -MMD -LDFLAGS = $(libsys) $(libgl) -lm +LDFLAGS = $(libdir) $(libsys) $(libgl) -limago -lpsys -lanim $(libc) sys ?= $(shell uname -s | sed 's/MINGW.*/mingw/') ifeq ($(sys), mingw) @@ -18,11 +19,14 @@ ifeq ($(sys), mingw) bin = demo.exe libgl = -lopengl32 libsys = -lmingw32 -lgdi32 -lwinmm -mconsole + libdir = -Llibs/w32 + libc = -lm else libgl = -lGL -lX11 -lXext + libc = -lm -ldl endif -$(bin): $(obj) +$(bin): $(obj) Makefile $(CC) -o $@ $(obj) $(LDFLAGS) -include $(dep) @@ -46,6 +50,25 @@ 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: run +run: + $(MAKE) -f Makefile.android install run + +.PHONY: stop +stop: + $(MAKE) -f Makefile.android stop .PHONY: cross cross: