-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (28 loc) · 832 Bytes
/
Makefile
File metadata and controls
37 lines (28 loc) · 832 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
CC = i686-w64-mingw32-gcc
WINDRES = i686-w64-mingw32-windres
OPTFLAGS = -O3 -s
DBGFLAGS = -DDEBUG -g
SOURCES = aoc_language_ini.c hook.c
FLAGS = -I./include
ifeq ($(RELEASE),1)
FLAGS += $(OPTFLAGS)
X1FLAGS = -flto -Wl,--exclude-all-symbols
else
FLAGS += $(DBGFLAGS)
X1FLAGS =
endif
all: getstrings.exe aoc-language-ini.dll
format:
clang-format -style=file -i *.h *.c
clean:
rm -f aoc-language-ini.dll getstrings.exe
.PHONY: all clean
strings.rc:
@echo "create strings.rc first by doing:"
@echo " getstrings.exe -rc /path/to/language_x1_p1.dll > strings.rc"
@exit 1
getstrings.exe: getstrings.c
$(CC) -o $@ -Wall -m32 $(FLAGS) $^
aoc-language-ini.dll: $(SOURCES) main.c strings.rc
$(WINDRES) strings.rc -O coff -o strings.res
$(CC) -o $@ -Wall -m32 $(FLAGS) $(X1FLAGS) -shared $(SOURCES) main.c strings.res