-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (27 loc) · 980 Bytes
/
Makefile
File metadata and controls
38 lines (27 loc) · 980 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
36
37
38
PREFIX?=/opt/cegcc
CC=$(PREFIX)/bin/arm-mingw32ce-gcc
CXX=$(PREFIX)/bin/arm-mingw32ce-g++
LD=$(PREFIX)/bin/arm-mingw32ce-g++
STRIP=$(PREFIX)/bin/arm-mingw32ce-strip
DLLTOOL=$(PREFIX)/bin/arm-mingw32ce-dlltool
AS=$(PREFIX)/bin/arm-mingw32ce-as
NM=$(PREFIX)/bin/arm-mingw32ce-nm
WINDRES=$(PREFIX)/bin/arm-mingw32ce-windres
OUTPUT=PyAppLauncher.exe
DEBUGOPT=
CFLAGS= -DEV_PLATFORM_WIN32 -DUNICODE -D_UNICODE -DEV_UNSAFE_SWPRINTF -mwin32 \
-O2 -mcpu=arm926ej-s -D_WIN32_WCE=0x600 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 \
-D_FILE_OFFSET_BITS=64 -static $(DEBUGOPT)
.PHONY: all clean format gen-test
all: $(OUTPUT) gen-test
clean:
rm -f $(OUTPUT) ./case-test/test-app/PyAppLauncher.exe src/*.o src/res/*.o
format:
clang-format -i *.c *.h
gen-test: $(OUTPUT)
cp $(OUTPUT) ./case-test/test-app/PyAppLauncher.exe
src/res/launcher.o: src/res/launcher.rc
$(WINDRES) -i $< -o $@
$(OUTPUT): src/main.c src/help.c src/res/launcher.o
$(CC) $^ -o $@ $(CFLAGS)
$(STRIP) $@