-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwindows.mk
83 lines (61 loc) · 2.07 KB
/
windows.mk
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
include config.mk
.PHONY: static shared clean test
default_target: all
LIBRARIES = -L./lib/win32/ -lopengl32 -lgdi32 -lglfw3
static: bin/lib${LIBNAME}.a
shared: bin/lib${LIBNAME}.so
bin/lib${LIBNAME}.a: ${OBJECTS}
@echo + Linking... [static]
@ar rs $@ $^
bin/lib${LIBNAME}.so: ${OBJECTS}
@echo + Linking... [shared]
@${CC} -shared $^ ${LIBRARIES} -o $@
${OBJECTS}: ${SOURCES}
@echo + Compiling...
@${CC} -c src/*.cpp ${CXXFLAGS}
rename:
@cp lib/win32/glfw3.dll lib/win32/libglfw3.so
clean:
@echo + Cleaning...
@rm *.o
test: static shared
@echo + Compiling tests...
@${CC} test/main.cpp ${TESTFLAGS} ${LIBRARIES} -o test/main.exe
glinfo:
@echo + Compiling GLInfo...
@${CC} test/glinfo.cpp ${TESTFLAGS} ${LIBRARIES} -o test/glinfo.exe
doublependulum:
@echo + Compiling DoublePendulum...
@${CC} test/doublependulum.cpp ${TESTFLAGS} ${LIBRARIES} -o test/doublependulum.exe
lissajous:
@echo + Compiling Lissajous...
@${CC} test/lissajous.cpp ${TESTFLAGS} ${LIBRARIES} -o test/lissajous.exe
diffeq:
@echo + Compiling DifferentialEquations...
@${CC} test/diffeq.cpp ${TESTFLAGS} ${LIBRARIES} -o test/diffeq.exe
diffeq_trace:
@echo + Compiling DifferentialEquationsTrace...
@${CC} test/diffeq_trace.cpp ${TESTFLAGS} ${LIBRARIES} -o test/diffeq_trace.exe
bezier:
@echo + Compiling BezierCurves...
@${CC} test/bezier.cpp ${TESTFLAGS} ${LIBRARIES} -o test/bezier.exe
bezier_animation:
@echo + Compiling BezierAnimation...
@${CC} test/bezier_animation.cpp ${TESTFLAGS} ${LIBRARIES} -o test/bezier_animation.exe
shader:
@echo + Compiling shader...
@${CC} test/shader.cpp ${TESTFLAGS} ${LIBRARIES} -o test/shader.exe
plotpoints:
@echo + Compiling plotpoints...
@${CC} test/plotpoints.cpp ${TESTFLAGS} ${LIBRARIES} -o test/plotpoints.exe
copy:
@cp lib/win32/libglfw3.so test/glfw3.dll
@cp bin/lib${LIBNAME}.so test/${LIBNAME}.dll
all: rename static shared clean test copy
@echo Ok.
help:
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... test"
@echo "... copy"