1 src = miniglut.c test.c
5 CFLAGS = -pedantic -Wall -g
7 isx86 ?= $(shell uname -m | sed 's/x86_64/x86/; s/i.86/x86/')
9 sys ?= $(shell uname -s | sed 's/MINGW.*/mingw/')
11 obj = $(src:.c=.w32.o)
14 LDFLAGS = -mconsole -lopengl32 -lgdi32 -lwinmm
15 else ifeq ($(sys)-$(isx86), Linux-x86)
18 # for other UNIX or non-x86 where sys_ and trig functions are not
19 # implemented, just use libc
20 CFLAGS += -DMINIGLUT_USE_LIBC
21 LDFLAGS = -lX11 -lGL -lm
28 $(CC) -o $@ $(obj) $(LDFLAGS)
31 $(CC) -o $@ $(CFLAGS) -c $<
39 $(MAKE) CC=i686-w64-mingw32-gcc sys=mingw
43 $(MAKE) CC=i686-w64-mingw32-gcc sys=mingw clean