-
Notifications
You must be signed in to change notification settings - Fork 2
/
root.mak
129 lines (105 loc) · 2.87 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
#############################################################################
# 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)
# Compiling message
ifeq ($(CONF_DEBUG),yes)
MSG = "(debug)"
else
MSG =
CFLAGS += -DNDEBUG
endif
#############################################################################
# EMU
# Emulator file name
EMUNAME = adv$(CONF_EMU)
# Emulator source directory. If it doesn't exist the emulator isn't compiled
ifeq ($(CONF_EMU),none)
EMUSRC=$(srcdir)/srcnone
endif
ifeq ($(CONF_EMU),mess)
EMUSRC=$(srcdir)/srcmess
endif
ifeq ($(EMUSRC),)
EMUSRC=$(srcdir)/src
endif
#############################################################################
# Advance
include $(srcdir)/advance/version.mak
include $(srcdir)/advance/advance.mak
ifneq ($(wildcard $(EMUSRC)),)
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/line.mak),)
include $(srcdir)/advance/line.mak
endif
ifneq ($(wildcard $(srcdir)/advance/d2.mak),)
include $(srcdir)/advance/d2.mak
endif
#############################################################################
# Standard GNU targets
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