-
Notifications
You must be signed in to change notification settings - Fork 49
/
root.mak
142 lines (120 loc) · 3.55 KB
/
root.mak
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
132
133
134
135
136
137
138
139
140
141
#############################################################################
# Root Makefile
#############################################################################
# Derived options
# Implementation system
ifndef CONF_SYSTEM
ifeq ($(CONF_HOST),dos)
CONF_SYSTEM=$(CONF_HOST)
else
ifeq ($(CONF_HOST),windows)
CONF_SYSTEM=$(CONF_HOST)
else
CONF_SYSTEM=unix
endif
endif
endif
# Binaries names
BINARYTAG = $(CONF_HOST)-$(CONF_ARCH)
BINARYDIR = $(CONF_HOST)/$(CONF_ARCH)
BINARYBUILDDIR = $(CONF_BUILD)
#############################################################################
# CFLAGS/LDFLAGS
# Override any environment CFLAGS/LDFLAGS declaration
# - CONF_DEFS are the defines from autoconf like HAVE_LIBZ_H...
# - CONF_CFLAGS_ARCH are the architecture flags
# - CONF_CFLAGS_OPT are the optimization flags
CFLAGS = $(CONF_DEFS) $(CONF_CFLAGS_ARCH) $(CONF_CFLAGS_OPT)
LDFLAGS = $(CONF_LDFLAGS)
LIBS = $(CONF_LIBS)
# Compiling message
ifeq ($(CONF_PERF),yes)
MSG = "(perf)"
else ifeq ($(CONF_DEBUG),yes)
MSG = "(debug)"
else
MSG =
CFLAGS += -DNDEBUG
endif
#############################################################################
# Advance
# Get the version if not using ./configure
ifeq ($(VERSION),)
VERSION=$(shell sh autover.sh)
endif
include $(srcdir)/advance/advance.mak
ifneq ($(wildcard $(srcdir)/advance/emu.mak),)
include $(srcdir)/advance/emu.mak
endif
ifneq ($(wildcard $(srcdir)/advance/lib.mak),)
include $(srcdir)/advance/lib.mak
endif
ifneq ($(wildcard $(srcdir)/advance/menu.mak),)
include $(srcdir)/advance/menu.mak
endif
ifneq ($(wildcard $(srcdir)/advance/cab.mak),)
include $(srcdir)/advance/cab.mak
endif
ifneq ($(wildcard $(srcdir)/advance/v.mak),)
include $(srcdir)/advance/v.mak
endif
ifneq ($(wildcard $(srcdir)/advance/cfg.mak),)
include $(srcdir)/advance/cfg.mak
endif
ifneq ($(wildcard $(srcdir)/advance/s.mak),)
include $(srcdir)/advance/s.mak
endif
ifneq ($(wildcard $(srcdir)/advance/k.mak),)
include $(srcdir)/advance/k.mak
endif
ifneq ($(wildcard $(srcdir)/advance/i.mak),)
include $(srcdir)/advance/i.mak
endif
ifneq ($(wildcard $(srcdir)/advance/j.mak),)
include $(srcdir)/advance/j.mak
endif
ifneq ($(wildcard $(srcdir)/advance/m.mak),)
include $(srcdir)/advance/m.mak
endif
ifneq ($(wildcard $(srcdir)/advance/blue.mak),)
include $(srcdir)/advance/blue.mak
endif
ifneq ($(wildcard $(srcdir)/advance/line.mak),)
include $(srcdir)/advance/line.mak
endif
ifneq ($(wildcard $(srcdir)/advance/d2.mak),)
include $(srcdir)/advance/d2.mak
endif
#############################################################################
# Standard GNU targets
uncrustify:
uncrustify -c uncrustify.cfg --no-backup \
$(srcdir)/advance/lib/*.c $(srcdir)/advance/lib/*.h \
$(srcdir)/advance/blit/*.c $(srcdir)/advance/blit/*.h \
$(srcdir)/advance/blue/*.c \
$(srcdir)/advance/cfg/*.c \
$(srcdir)/advance/d2/*.cc \
$(srcdir)/advance/dos/*.c $(srcdir)/advance/dos/*.h \
$(srcdir)/advance/i/*.c \
$(srcdir)/advance/j/*.c \
$(srcdir)/advance/k/*.c \
$(srcdir)/advance/line/*.cc \
$(srcdir)/advance/linux/*.c $(srcdir)/advance/linux/*.h \
$(srcdir)/advance/m/*.c \
$(srcdir)/advance/menu/*.cc $(srcdir)/advance/menu/*.h \
$(srcdir)/advance/osd/*.c $(srcdir)/advance/osd/*.h \
$(srcdir)/advance/s/*.c \
$(srcdir)/advance/sdl/*.c $(srcdir)/advance/sdl/*.h \
$(srcdir)/advance/v/*.c $(srcdir)/advance/v/*.h \
$(srcdir)/advance/windows/*.c $(srcdir)/advance/windows/*.h
info:
dvi:
install-strip: install
check:
installcheck: install check
mostlyclean: distclean
maintainer-clear: distclean
clean:
$(RM) -f -r obj
distclean: clean
$(RM) -f config.status config.log