-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
75 lines (65 loc) · 2.04 KB
/
Makefile
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
# This is a very dumbass Makefile, but it suits the needs
# for a small project such as EGLBenchmark
INCDIRS=-I./
LIBDIRS=-L./
CFLAGS=-Wall -g -fPIC
LIBS=-lEGL -lGLESv2 -lX11 -lpng
OUTPUT=libEGLBenchmark.so
MKDIR=mkdir
CPP=g++
RM=rm
_OBJS= \
__API.o \
EngineCore.o \
EGLX11Display.o \
EGLX11Benchmark.o \
b01_ContextInit.o \
b02_SimpleGLShading.o \
b03_SimpleTriangle.o \
b04_ETCTextureTest.o \
b05_RGBTextureTest.o \
b06_VBOElementsRGB.o \
b07_PointCloud.o \
b08_Scenegraph.o \
b09_Terrain.o \
SimpleShader.o \
SimpleMesh.o \
SimpleScenegraph.o \
SimpleTexture.o \
GLWrapper.o \
GLMath.o \
DebugLog.o
ODIR=objs
OBJS=$(patsubst %,$(ODIR)/%,$(_OBJS))
HEADERS= \
__API.h \
EngineCore.h \
EGLX11Display.h \
EGLX11Benchmark.h \
b01_ContextInit.h \
b02_SimpleGLShading.h \
b03_SimpleTriangle.h \
b04_ETCTextureTest.h \
b05_RGBTextureTest.h \
b06_VBOElementsRGB.h \
b07_PointCloud.h \
b08_Scenegraph.h \
b09_Terrain.h \
SimpleShader.h \
SimpleMesh.h \
SimpleScenegraph.h \
SimpleTexture.h \
DebugLog.h \
GLMath.h \
GLWrapper.h
default: ${ODIR} all
${ODIR}:
${MKDIR} -p ${ODIR}
${ODIR}/%.o: %.cpp ${HEADERS}
${CPP} -c -o $@ $< $(CFLAGS) ${INCDIRS}
all: ${OBJS}
${CPP} -o ${OUTPUT} -shared ${OBJS} ${LIBDIRS} ${LIBS}
h2xml __API.h -o __API.xml -I .
xml2py __API.xml -o __API.py -c -l ./${OUTPUT}
clean:
rm -rf ${OBJS} ${OUTPUT}