-
Notifications
You must be signed in to change notification settings - Fork 12
/
makefile.win64
37 lines (28 loc) · 1.44 KB
/
makefile.win64
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
#Usage: ISO=... CC=x86_64-w64-mingw32-gcc-8.3-win32 DLLTOOL=x86_64-w64-mingw32-dlltool make -f makefile.win64
#Usage with mk: CC=x86_64-w64-mingw32-gcc-8.3-win32 DLLTOOL=x86_64-w64-mingw32-dlltool MAKEFILE=makefile.win64 ./mk.sh
CFLAGS = -O2 -g -mtune=native -Wall -D CTRLANG=${ISO} -D INCLUDETESTS -D WIN \
-D REPLACE_ERROR_SYSTEM -D WINDOWS_ERROR_SYSTEM\
-D REPLACE_PROGRAM_PASSWORD -D WINDOWS_PROGRAM_PASSWORD\
-D REPLACE_PLUGIN_SYSTEM -D WINDOWS_PLUGIN_SYSTEM\
-D REPLACE_CLOCK_WAIT -D WINDOWS_CLOCK_WAIT\
-D WINDOWS64_SETENV
OBJS = test.o siphash.o utf8.o memory.o util.o base.o collections.o file.o system.o \
world.o lexer.o parser.o walker.o translator.o citrine.o portability.o
prefix ?= /usr
.SUFFIXES: .o .c
all:ctr
install:
install -d $(DESTDIR)$(prefix)/bin $(DESTDIR)$(prefix)/share/fonts/citrine
install ./bin/$(shell uname -s)/ctr* $(DESTDIR)$(prefix)/bin
install ./fonts/Citrine.ttf $(DESTDIR)$(prefix)/share/fonts/citrine
ctr: $(OBJS)
$(CC) -shared $(OBJS) -g -lm -o bin/Win64/ctr${ISO}.exe
gendef bin/Win64/ctr${ISO}.exe
$(DLLTOOL) -d ctr${ISO}.def -l ctr${ISO}import.lib -e ctr${ISO}exports.o
$(CC) ctr${ISO}exports.o $(OBJS) -g -lm $(LFLAGS) $(EXTRA) -o bin/Win64/ctr${ISO}.exe
.c.o:
$(CC) $(CFLAGS) $(EXTRACFLAGS) -I i18n/${ISO} -c $<
clean:
rm -rf ${OBJS} ctr
plugin:
cd plugins/${PACKAGE} ; make -f makefile.win64 clean ; make -f makefile.win64 install-${NAME}