-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
makefile.inc
73 lines (57 loc) · 1001 Bytes
/
makefile.inc
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
ifdef DEBUG
OPT = -g
else
OPT = -O3
endif
.SUFFIXES: .d .iv
.PRECIOUS : %.c %.iv
BINDIR = ../bin
LIBDIR = ../lib
INCDIR = ../include
# 32 bit ARM processor with software float
# I had to use -D_FORTIFY_SOURCE=0 because the target system had an old GLIBC
ifdef ARM32SF
CC = arm-linux-gnueabi-gcc -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
HCC = gcc # for the host
else
CC = gcc
HCC = gcc
endif
DPP = $(BINDIR)/dpp
DPPOPTS = -C
ifdef THIRTYTWOBIT
OPT += -m32
endif
ifdef BOEHM_GC
OPT += -DBOEHM_GC
endif
ifdef CYGWIN
EXE = .exe
endif
# -fPIC required by WINE
CFLAGS = -I$(INCDIR) $(OPT) -Wno-parentheses -fPIC
LDFLAGS = -lm
ifdef NATIVE_THREADS
CFLAGS += -DNATIVE_THREADS
LDFLAGS += -lpthread
endif
ifdef NO_CYGWIN
EXE = .exe
CFLAGS += -mno-cygwin
endif
ifdef CPLUS
CFLAGS += -x c++
endif
ifdef FASTWIDE
DPPOPTS += -F
endif
ifdef INLINE
DPPOPTS += -S4
endif
ifdef OVERLOADS
DPPOPTS += -X
endif
DPPOPTS += $(STRAT)
GFLAGS = $(CFLAGS) -Wno-return-type -fPIC
%.c: %.d
$(DPP) $(DPPOPTS) -p $<