X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=Makefile;h=0fc7e973bb463b834a25b5a811be010311b90beb;hb=refs%2Fheads%2Fscreensaver;hp=f27fe8553960aaf4b8db45992ff0a7751fdbdccf;hpb=ba970dd01d42881977bcb41a346d82910f6cda5f;p=censuslogo diff --git a/Makefile b/Makefile index f27fe85..0fc7e97 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -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 @@ -6,15 +6,19 @@ bin = censuslogo sys ?= $(shell uname -s | sed 's/MINGW.*/mingw/') CFLAGS = -pedantic -Wall -g -DNOLOAD -LDFLAGS = $(LDFLAGS_$(sys)) -lm +LDFLAGS = $(ldflags_sys) -lm -LDFLAGS_Linux = -lGL -lGLU -lglut -LDFLAGS_mingw = -lmingw32 -mconsole -lfreeglut_static -lopengl32 -lglu32 -lgdi32 -lwinmm 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)