-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
131 lines (109 loc) · 4.57 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# This Makefile created by EXL, 25-Nov-2021
MOTOMAGX_DEVICE_PATH = /arm-eabi
MOTOMAGX_DEVICE_CC = $(MOTOMAGX_DEVICE_PATH)/bin/arm-linux-gnueabi-gcc
MOTOMAGX_DEVICE_CXX = $(MOTOMAGX_DEVICE_PATH)/bin/arm-linux-gnueabi-g++
MOTOMAGX_DEVICE_STRIP = $(MOTOMAGX_DEVICE_PATH)/bin/arm-linux-gnueabi-strip
MOTOMAGX_DEVICE_CFLAGS = -pipe -Wall -W -O2
MOTOMAGX_DEVICE_CXXFLAGS = -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2
MOTOMAGX_EMULATOR_PATH = /opt/toolchains/motomagx-emulator
MOTOMAGX_EMULATOR_CC = $(MOTOMAGX_EMULATOR_PATH)/bin/i686-mot-linux-gnu-gcc
MOTOMAGX_EMULATOR_CXX = $(MOTOMAGX_EMULATOR_PATH)/bin/i686-mot-linux-gnu-g++
MOTOMAGX_EMULATOR_STRIP = $(MOTOMAGX_EMULATOR_PATH)/bin/i686-mot-linux-gnu-strip
MOTOMAGX_EMULATOR_CFLAGS = -pipe -Wall -W -O2
MOTOMAGX_EMULATOR_CXXFLAGS = -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2
all: emulator device
device: fbgrab fbdump ograb jgrab dgrab zgrab pgrab
emulator: fbgrab_EMU fbdump_EMU ograb_EMU jgrab_EMU dgrab_EMU zgrab_EMU pgrab_EMU
fbgrab: fbgrab.c
$(MOTOMAGX_DEVICE_CC) $(MOTOMAGX_DEVICE_CFLAGS) \
fbgrab.c -o fbgrab
$(MOTOMAGX_DEVICE_STRIP) -s fbgrab
fbgrab_EMU: fbgrab.c
$(MOTOMAGX_EMULATOR_CC) $(MOTOMAGX_EMULATOR_CFLAGS) \
fbgrab.c -o fbgrab_EMU
$(MOTOMAGX_EMULATOR_STRIP) -s fbgrab_EMU
fbdump: fbdump.c
$(MOTOMAGX_DEVICE_CC) $(MOTOMAGX_DEVICE_CFLAGS) \
fbdump.c -o fbdump
$(MOTOMAGX_DEVICE_STRIP) -s fbdump
fbdump_EMU: fbdump.c
$(MOTOMAGX_EMULATOR_CC) $(MOTOMAGX_EMULATOR_CFLAGS) \
fbdump.c -o fbdump_EMU
$(MOTOMAGX_EMULATOR_STRIP) -s fbdump_EMU
ograb: ograb.c
$(MOTOMAGX_DEVICE_CC) $(MOTOMAGX_DEVICE_CFLAGS) \
ograb.c -o ograb
$(MOTOMAGX_DEVICE_STRIP) -s ograb
ograb_EMU: ograb.c
$(MOTOMAGX_EMULATOR_CC) $(MOTOMAGX_EMULATOR_CFLAGS) \
ograb.c -o ograb_EMU
$(MOTOMAGX_EMULATOR_STRIP) -s ograb_EMU
jgrab: jgrab.c
$(MOTOMAGX_DEVICE_CC) $(MOTOMAGX_DEVICE_CFLAGS) \
-I$(MOTOMAGX_DEVICE_PATH)/arm-linux-gnueabi/include \
jgrab.c -o jgrab \
-L$(MOTOMAGX_DEVICE_PATH)/arm-linux-gnueabi/lib -ljpeg
$(MOTOMAGX_DEVICE_STRIP) -s jgrab
jgrab_EMU: jgrab.c
$(MOTOMAGX_EMULATOR_CC) $(MOTOMAGX_EMULATOR_CFLAGS) \
-I$(MOTOMAGX_EMULATOR_PATH)/include \
jgrab.c -o jgrab_EMU \
-L$(MOTOMAGX_EMULATOR_PATH)/lib -ljpeg
$(MOTOMAGX_EMULATOR_STRIP) -s jgrab_EMU
pgrab: pgrab.c
$(MOTOMAGX_DEVICE_CC) $(MOTOMAGX_DEVICE_CFLAGS) \
-I$(MOTOMAGX_DEVICE_PATH)/arm-linux-gnueabi/include \
pgrab.c -o pgrab \
-L$(MOTOMAGX_DEVICE_PATH)/arm-linux-gnueabi/lib -lpng -lz
$(MOTOMAGX_DEVICE_STRIP) -s pgrab
pgrab_EMU: pgrab.c
$(MOTOMAGX_EMULATOR_CC) $(MOTOMAGX_EMULATOR_CFLAGS) \
-I$(MOTOMAGX_EMULATOR_PATH)/include \
pgrab.c -o pgrab_EMU \
-L$(MOTOMAGX_EMULATOR_PATH)/lib -lqte-mt
$(MOTOMAGX_EMULATOR_STRIP) -s pgrab_EMU
zgrab: zgrab.cpp
$(MOTOMAGX_DEVICE_CXX) $(MOTOMAGX_DEVICE_CXXFLAGS) \
-I$(MOTOMAGX_DEVICE_PATH)/lib/qt-zn5/include \
-I$(MOTOMAGX_DEVICE_PATH)/lib/ezx-zn5/include \
-I$(MOTOMAGX_DEVICE_PATH)/arm-linux-gnueabi/include \
zgrab.cpp -o zgrab \
-Wl,-rpath-link,$(MOTOMAGX_DEVICE_PATH)/lib/ezx-zn5/lib \
-L$(MOTOMAGX_DEVICE_PATH)/lib/ezx-zn5/lib -lqte-mt
$(MOTOMAGX_DEVICE_STRIP) -s zgrab
zgrab_EMU: zgrab.cpp
$(MOTOMAGX_EMULATOR_CXX) $(MOTOMAGX_EMULATOR_CXXFLAGS) \
-I$(MOTOMAGX_EMULATOR_PATH)/include \
zgrab.cpp -o zgrab_EMU \
-L$(MOTOMAGX_EMULATOR_PATH)/lib -lqte-mt
$(MOTOMAGX_EMULATOR_STRIP) -s zgrab_EMU
dgrab: dgrab.cpp
$(MOTOMAGX_DEVICE_CXX) $(MOTOMAGX_DEVICE_CXXFLAGS) \
-I$(MOTOMAGX_DEVICE_PATH)/lib/qt-zn5/include \
-I$(MOTOMAGX_DEVICE_PATH)/lib/ezx-zn5/include \
-I$(MOTOMAGX_DEVICE_PATH)/arm-linux-gnueabi/include \
dgrab.cpp -o dgrab \
-Wl,-rpath-link,$(MOTOMAGX_DEVICE_PATH)/lib/ezx-zn5/lib \
-L$(MOTOMAGX_DEVICE_PATH)/lib/ezx-zn5/lib -lqte-mt
$(MOTOMAGX_DEVICE_STRIP) -s dgrab
dgrab_EMU: dgrab.cpp
$(MOTOMAGX_EMULATOR_CXX) $(MOTOMAGX_EMULATOR_CXXFLAGS) \
-I$(MOTOMAGX_EMULATOR_PATH)/include \
dgrab.cpp -o dgrab_EMU \
-L$(MOTOMAGX_EMULATOR_PATH)/lib -lqte-mt
$(MOTOMAGX_EMULATOR_STRIP) -s dgrab_EMU
clean:
-rm -f fbgrab fbdump ograb jgrab dgrab zgrab pgrab
-rm -f fbgrab_EMU fbdump_EMU ograb_EMU jgrab_EMU dgrab_EMU zgrab_EMU pgrab_EMU
-rm -f MagxScreenshot.zip
-rm -f MagxScreenshot.tar
zip: all
-zip -r -9 MagxScreenshot.zip \
fbgrab.c fbdump.c ograb.c jgrab.c pgrab.c dgrab.cpp zgrab.cpp \
fbgrab fbdump ograb jgrab dgrab zgrab pgrab \
fbgrab_EMU fbdump_EMU ograb_EMU jgrab_EMU dgrab_EMU zgrab_EMU pgrab_EMU
tar: all
-tar -cvf MagxScreenshot.tar \
fbgrab.c fbdump.c ograb.c jgrab.c pgrab.c dgrab.cpp zgrab.cpp \
fbgrab fbdump ograb jgrab dgrab zgrab pgrab \
fbgrab_EMU fbdump_EMU ograb_EMU jgrab_EMU dgrab_EMU zgrab_EMU pgrab_EMU