-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (24 loc) · 675 Bytes
/
Makefile
File metadata and controls
38 lines (24 loc) · 675 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
CC=gcc
CPP=g++
FLAGS=-Wall -ansi -pedantic -DLOGENABLE -Wno-unused-function -DLOGENABLE $(INC)
CFLAGS=-std=c99
CPPFLAGS=-std=c++0x -Wno-write-strings $(INC)
OPENGL_INCLUDE=-Iglew/include -Iglm
OPENGL_LIB=-Lglew/lib/Release/Win32 -lglew32s -lopengl32 -lgdi32
LDFLAGS=-g -O2 -Wall -W $(LD_LIB)
STDCPPLIB=-lstdc++
.PHONY: clean all
all: main test
test:
./main.exe
main: log.o gldebug.o w32.o glgrid.o xbuf.o main.o
$(CC) -o $@ $^ $(LIBS) $(LDFLAGS) $(OPENGL_LIB) $(STDCPPLIB)
# basics rules
%.o: %.c
$(CC) -o $@ -c $< $(CFLAGS) $(OPENGL_INCLUDE)
%.o: %.cpp
$(CPP) -o $@ -c $< $(CPPFLAGS) $(OPENGL_INCLUDE)
# Clean UP
clean:
@rm -f *.o
@rm -f *.exe