-
Notifications
You must be signed in to change notification settings - Fork 62
/
Makefile
69 lines (47 loc) · 2.6 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
all : rawdraw simple rawdraw_sf.h
#for X11 consider: xorg-dev
#for X11, you will need: libx-dev
#for full screen you'll need: libxinerama-dev libxext-dev
#for OGL You'll need: mesa-common-dev libglu1-mesa-dev
#-DCNFGRASTERIZER
# and
#-CNFGOGL
# are incompatible.
MINGW32:=/usr/bin/i686-w64-mingw32
rawdraw-clang.exe: rawdraw.c
clang rawdraw.c -o rawdraw-clang.exe -g -O1 -Irawdraw -lopengl32 -lgdi32 -luser32
rawdrawogl-clang.exe: rawdraw.c
clang rawdraw.c -o rawdrawogl-clang.exe -g -O1 -Irawdraw -DCNFGOGL -lopengl32 -lgdi32 -luser32
rawdraw.exe : rawdraw.c
$(MINGW32)gcc -g -m32 -o $@ $^ -lgdi32
rawdrawogl.exe : rawdraw.c
$(MINGW32)gcc -g -m32 -o $@ $^ -lgdi32 -DCNFGOGL -lopengl32
rawdraw_egl : rawdraw.c
gcc -o $@ $^ -lMali -lpthread -lm -O3
simple : simple.c
gcc -o $@ $^ -lX11 -lpthread -lXinerama -lXext -lGL -g -lm -ldl
rawdraw : rawdraw.c
gcc -o $@ $^ -lX11 -lpthread -lXinerama -lXext -lGL -g -lm -ldl
rawdraw_ogl : rawdraw.c
gcc -o $@ $^ -lX11 -lpthread -lXinerama -lXext -lGL -g -DCNFGOGL -lm -ldl
osdtest : osdtest.c CNFG.c
gcc -o $@ $^ -lX11 -lpthread -lXinerama -lXext -DCNFG_HAS_XINERAMA -DCNFG_HAS_XSHAPE -lm -ldl
ogltest : ogltest.c CNFG.c
gcc -o $@ $^ -lX11 -lXinerama -lGL -DCNFGOGL -lm
rawdraw_http : rawdraw.c tools/rawdraw_http_page.h
$(CC) -o $@ $< -DCNFGHTTP -lm -ldl -Os -s
tools/binary_to_buffer : tools/binary_to_buffer.c
$(CC) -o $@ $^
tools/rawdraw_http_page.h : tools/rawdraw_http_files/index.html tools/binary_to_buffer
cat $< | gzip -9 | tools/binary_to_buffer webpage_buffer > $@
ogltest.exe : ogltest.c CNFG.c
$(MINGW32)gcc -o $@ $^ -lgdi32 -lkernel32 -lopengl32 -DCNFGOGL -lm
tools/single_file_creator : tools/single_file_creator.c
gcc -o $@ $^
rawdraw_sf.h : tools/single_file_creator CNFG.h tools/rawdraw_http_page.h
echo "//This file was automatically generated by Makefile at https://github.com/cntools/rawdraw" > $@
echo "//This single-file feature is still in early alpha testing." >> $@f
echo "//Generated from files git hash $(shell git rev-parse HEAD) on $(shell date) (This is not the git hash of this file)" >> $@
./tools/single_file_creator CNFG.h CNFG.c CNFGWinDriver.c CNFGEGLLeanAndMean.c CNFGRasterizer.c CNFGEGLDriver.c CNFGWASMDriver.c CNFGXDriver.c CNFGFunctions.c CNFG3D.c CNFGAndroid.h CNFGHTTP.c tools/rawdraw_http_page.h >> $@
clean :
rm -rf *.o *~ simple simple.exe rawdraw.exe rawdrawogl.exe rawdraw rawdraw_ogl rawdraw_mac rawdraw_mac_soft rawdraw_mac_cg rawdraw_mac_ogl ogltest ogltest.exe rawdraw_egl rawdraw_http rawdraw_sf.h rawdraw_sf.hf tools/single_file_creator tools/binary_to_buffer tools/rawdraw_http_page.h