X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=Makefile;h=0fc7e973bb463b834a25b5a811be010311b90beb;hb=refs%2Fheads%2Fscreensaver;hp=ffa81be56eda18805ff03b9b84f749524dad55d2;hpb=6924537e1555c26ab714ca6eda4960a3ca1bd520;p=censuslogo diff --git a/Makefile b/Makefile index ffa81be..0fc7e97 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,24 @@ -src = $(wildcard src/*.c) +src = $(src_main) $(filter-out $(wildcard src/main_*.c), $(wildcard src/*.c)) obj = $(src:.c=.o) dep = $(obj:.o=.d) bin = censuslogo sys ?= $(shell uname -s | sed 's/MINGW.*/mingw/') -CFLAGS = -pedantic -Wall -g -LDFLAGS = $(LDFLAGS_$(sys)) -lm +CFLAGS = -pedantic -Wall -g -DNOLOAD +LDFLAGS = $(ldflags_sys) -lm -LDFLAGS_Linux = -lGL -lGLU -lglut -LDFLAGS_mingw = -lmingw32 -mconsole -lopengl32 -lglu32 -lfreeglut ifeq ($(sys), mingw) + src_main = src/main_w32.c obj = $(src:.c=.w32.o) bin = censuslogo.exe + CFLAGS += -DFREEGLUT_STATIC + + ldflags_sys = -lmingw32 -mconsole -lfreeglut_static -lopengl32 -lglu32 -lgdi32 -lwinmm +else + src_main = src/main_x11.c + ldflags_sys = -lGL -lGLU -lX11 endif $(bin): $(obj)