blob: 9f1c0dab0ae82aed396e63b6269f6aa9ae18a8df (
plain) (
blame)
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
|
#
# uCsim Makefile
#
# (c) Drotos Daniel, Talker Bt. 1997,99
#
STARTYEAR = 1997
SHELL = /bin/sh
include packages.mk
#PKGS = cmd.src sim.src gui.src s51.src avr.src z80.src pdk.src doc
VPATH = @srcdir@
srcdir = @srcdir@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
# Compiling entire program or any subproject
# ------------------------------------------
all: checkconf #libs apps
$(MAKE) libs
$(MAKE) apps
libs: main_all cmd_src_all sim_src_all gui_src_all
main_all:
$(MAKE) -f main.mk all
cmd_src_all:
$(MAKE) -C cmd.src cmd.src
sim_src_all:
$(MAKE) -C sim.src sim.src
gui_src_all:
$(MAKE) -C gui.src gui.src
apps: $(PKGS) main_app
main_app:
$(MAKE) -f main.mk main_app
.PHONY: $(PKGS)
$(PKGS):
$(MAKE) -C $@ $@
#main_libs: main.mk
# $(MAKE) -f main.mk libs
# Compiling and installing everything and runing test
# ---------------------------------------------------
.PHONY: install INSTALL Install
install:
$(MAKE) -f main.mk install
@for pkg in $(PKGS); do\
$(MAKE) -C $$pkg install ;\
done
# Deleting all the installed files
# --------------------------------
uninstall:
$(MAKE) -f main.mk uninstall
@for pkg in $(PKGS); do\
$(MAKE) -C $$pkg uninstall ;\
done
# Deleting all files created by building the program
# --------------------------------------------------
clean:
$(MAKE) -f $(srcdir)/clean.mk clean EXEEXT=$(EXEEXT)
@for pkg in $(PKGS_ALL); do\
$(MAKE) -C $$pkg -f ../$(srcdir)/$$pkg/clean.mk clean EXEEXT=$(EXEEXT) ;\
done
# Deleting all files created by configuring or building the program
# -----------------------------------------------------------------
distclean: clean
$(MAKE) -f $(srcdir)/clean.mk distclean
@for pkg in $(PKGS_ALL); do\
$(MAKE) -C $$pkg -f ../$(srcdir)/$$pkg/clean.mk distclean ;\
done
rm -rf doc/*~ doc/*.bak Makefile packages.mk libtool
$(MAKE) -C example clean
$(MAKE) -C s51.src/test clean
$(MAKE) -C stm8.src/test clean
$(MAKE) -C tlcs.src/test clean
$(MAKE) -C z80.src/test clean
# Like clean but some files may still exist
# -----------------------------------------
mostlyclean: clean
$(MAKE) -f clean.mk mostlyclean
@for pkg in $(PKGS_ALL); do\
$(MAKE) -C $$pkg -f ../$(srcdir)/$$pkg/clean.mk mostlyclean ;\
done
# Deleting everything that can reconstructed by this Makefile. It deletes
# everything deleted by distclean plus files created by bison, stc.
# -----------------------------------------------------------------------
realclean: distclean
$(MAKE) -f clean.mk realclean
@for pkg in $(PKGS_ALL); do\
$(MAKE) -C $$pkg -f ../$(srcdir)/$$pkg/clean.mk realclean ;\
done
# Performing self-test
# --------------------
check:
$(MAKE) -f main.mk check
@for pkg in $(PKGS); do\
$(MAKE) -C $$pkg check ;\
done
test:
$(MAKE) -f main.mk test
@for pkg in $(PKGS); do\
$(MAKE) -C $$pkg test ;\
done
# Performing installation test
# ----------------------------
installcheck:
# Creating dependencies
# ---------------------
dep:
$(MAKE) -f main.mk dep
@for pkg in $(PKGS); do\
$(MAKE) -C $$pkg dep ;\
done
# My rules
# --------
putcopyright:
'./put(c)' -s $(STARTYEAR) *.cc *.h *.y *.l
# Remaking configuration
# ----------------------
configure: configure.ac
@$(top_srcdir)/mkecho $(top_builddir) "RE-CREATING CONFIGURE"
autoconf configure.ac >configure
chmod 755 configure
config.status: configure
@$(top_srcdir)/mkecho $(top_builddir) "RE-CHECKING CONFIGURATION (re-creating config.status from configure)"
@if [ -x ./config.status ]; then \
./config.status -recheck;\
else\
if [ -x ./conf ]; then\
./conf;\
else\
./configure;\
fi\
fi
makefiles: config.status
@$(top_srcdir)/mkecho $(top_builddir) "RE-MAKING MAKEFILES"
$(SHELL) ./config.status
main.mk: $(srcdir)/main_in.mk config.status
@$(top_srcdir)/mkecho $(top_builddir) "RE-MAKING MAIN.MK"
$(SHELL) ./config.status
freshconf: echo_freshconf configure main.mk ddconfig.h
ddconfig.h: ddconfig_in.h config.status
$(SHELL) ./config.status
echo_freshconf:
@$(top_srcdir)/mkecho $(top_builddir) "FRESHCONF"
checkconf:
@$(top_srcdir)/mkecho $(top_builddir) "CHECKCONF"
@if [ -f devel ]; then $(MAKE) freshconf; fi
# End of Makefile
|