-
Notifications
You must be signed in to change notification settings - Fork 2
/
RULES
84 lines (69 loc) · 2.12 KB
/
RULES
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
#
# These are some standard rules common to all Makefiles.
#
include $(srcdir)/BINFILES
include $(srcdir)/SRCFILES
include $(srcdir)/EXTRAFILES
include $(srcdir)/MISCFILES
ifdef CPU
ifeq ($(CPU),v4e)
MODEL = -mcpu=5475
else
MODEL = -m68$(CPU)
endif
else
# leave empty/default
MODEL =
endif
#
# global CFLAGS
#
INCLUDES = -I$(top_srcdir)
CFLAGS = $(INCLUDES) $(DEFINITIONS) $(MODEL) $(GENERAL) $(OPTS) $(WARN)
all: all-recursive all-here
clean:: clean-recursive
rm -f *.o lib*.a *.tmp
rm -f core report nohup.out errlog
test "$(compile_all_dirs)" = "" || rm -f $(compile_all_dirs)/*.o $(compile_all_dirs)/lib*.a
test "$(GENFILES)" = "" || rm -rf $(GENFILES)
bakclean:: bakclean-recursive
rm -f *~ *# *.BAK *.bak
rm -f *.orig *.rej
distclean:: distclean-recursive
rm -f *.o lib*.a *.tmp *~ *# *.orig *.rej *.BAK *.bak
rm -f core report nohup.out errlog
test "$(GENFILES)" = "" || rm -rf $(GENFILES)
test "$(SGENFILES)" = "" || rm -rf $(SGENFILES)
rm -rf .deps
strip: strip-recursive
install: install-recursive
uninstall: uninstall-recursive
DISTFILES = $(MISCFILES) $(SRCFILES)
distdir = $(top_builddir)/freemint-$(VERSION)/$(subdir)
distdir: $(DISTFILES) distdir-local
@for file in $(DISTFILES); do \
d=$(srcdir); \
test -d $$d/$$file \
|| test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2>/dev/null \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
done
list='$(SUBDIRS)'; for subdir in $$list; do \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
chmod 777 $(distdir)/$$subdir; \
(cd $$subdir && $(MAKE) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
|| exit 1; \
done
distdir-local:
all-recursive clean-recursive bakclean-recursive distclean-recursive \
install-recursive uninstall-recursive dist-recursive strip-recursive::
@set fnord $(MAKEFLAGS); amf=$$2; \
list='$(SUBDIRS)'; for subdir in $$list; do \
target=`echo $@ | sed s/-recursive//`; \
echo "Making $$target in $$subdir"; \
(cd $$subdir && $(MAKE) -r $$target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"