summaryrefslogtreecommitdiffstats
path: root/glut/mingw32
blob: 808146e8f7fdecc0c4a9fe6743a26ffcb3783e85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
PROG = pyramid
OBJS = $(PROG).o math3d.o
CC = gcc
DBGFLAGS = -g -O0
ifdef DEBUG
    CFLAGS = $(DBGFLAGS) -Wall -std=c99
else
    CFLAGS = -Wall -std=c99 -O2 -march=native -mtune=native
endif
LFLAGS = -lglew32 -lopengl32 -lglu32 -lm -lfreeglut 

$(PROG): $(OBJS)
	$(CC) -o $(PROG) $(OBJS) $(LFLAGS)

$(PROG).o: $(PROG).c math3d.h
	$(CC) -c $(CFLAGS) $(PROG).c

math3d.o: math3d.c math3d.h
	$(CC) -c $(CFLAGS) math3d.c

.PHONY: clean

clean:
	rm -f *.o ./$(PROG).exe