-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.w32
167 lines (121 loc) · 4.89 KB
/
Makefile.w32
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
include Makefile.def
CURRDIR=./
TAPE=/dev/ntape
DATE=`date +"%d%m%Y"`
include makedefs.src
include objdefs.unix
include makedefs.files
ALLFLAGS = $(CFLAGS) -D$(CHARSET) -DSTDINCLUDES=\"$(INCDIR)\" -DLIBDIR=\"$(LIBDIR)\"
#---------------------------------------------------------------------------
# primary targets
binaries: $(ALLTARGETS)
all: binaries docs
docs: $(TEX2DOCTARGET) $(TEX2HTMLTARGET)
cd doc_DE; $(MAKE) TEX2DOC=../$(TEX2DOCTARGET) TEX2HTML=../$(TEX2HTMLTARGET) RM="rm -f"
cd doc_EN; $(MAKE) TEX2DOC=../$(TEX2DOCTARGET) TEX2HTML=../$(TEX2HTMLTARGET) RM="rm -f"
$(ASLTARGET): $(AS_OBJECTS) $(ASM_OBJECTS) $(ST_OBJECTS) $(CODE_OBJECTS) $(NLS_OBJECTS)
$(LD) -o $(ASLTARGET) $(ASM_OBJECTS) $(AS_OBJECTS) $(ST_OBJECTS) $(CODE_OBJECTS) $(NLS_OBJECTS) -lm $(LDFLAGS)
$(PLISTTARGET): $(PLIST_OBJECTS) $(NLS_OBJECTS)
$(LD) -o $(PLISTTARGET) $(PLIST_OBJECTS) $(NLS_OBJECTS) -lm $(LDFLAGS)
$(ALINKTARGET): $(ALINK_OBJECTS) $(NLS_OBJECTS)
$(LD) -o $(ALINKTARGET) $(ALINK_OBJECTS) $(NLS_OBJECTS) -lm $(LDFLAGS)
$(PBINDTARGET): $(PBIND_OBJECTS) $(NLS_OBJECTS)
$(LD) -o $(PBINDTARGET) $(PBIND_OBJECTS) $(NLS_OBJECTS) -lm $(LDFLAGS)
$(P2HEXTARGET): $(P2HEX_OBJECTS) $(NLS_OBJECTS)
$(LD) -o $(P2HEXTARGET) $(P2HEX_OBJECTS) $(NLS_OBJECTS) -lm $(LDFLAGS)
$(P2BINTARGET): $(P2BIN_OBJECTS) $(NLS_OBJECTS)
$(LD) -o $(P2BINTARGET) $(P2BIN_OBJECTS) $(NLS_OBJECTS) -lm $(LDFLAGS)
$(RESCOMPTARGET): $(RESCOMP_OBJECTS)
$(LD) -o $(RESCOMPTARGET) $(RESCOMP_OBJECTS) $(LDFLAGS)
$(TEX2DOCTARGET): $(TEX2DOC_OBJECTS)
$(LD) -o $(TEX2DOCTARGET) $(TEX2DOC_OBJECTS) $(LDFLAGS) -lm
$(TEX2HTMLTARGET): $(TEX2HTML_OBJECTS)
$(LD) -o $(TEX2HTMLTARGET) $(TEX2HTML_OBJECTS) $(LDFLAGS) -lm
$(UNUMLAUTTARGET): $(UNUMLAUT_OBJECTS)
$(LD) -o $(UNUMLAUTTARGET) $(UNUMLAUT_OBJECTS) $(LDFLAGS)
$(MKDEPENDTARGET): $(MKDEPEND_OBJECTS)
$(LD) -o $(MKDEPENDTARGET) $(MKDEPEND_OBJECTS) $(LDFLAGS)
#---------------------------------------------------------------------------
# special rules for objects dependant on string resource files
include makedefs.str
include Makefile.dep
Makefile.dep depend: $(MKDEPENDTARGET)
$(CURRDIR)$(MKDEPENDTARGET) -o Makefile.dep *.c
#---------------------------------------------------------------------------
# supplementary targets
test: $(ALLTARGETS)
cd tests; ./testall
install: $(ALLTARGETS)
./install.sh $(BINDIR) $(INCDIR) $(MANDIR) $(LIBDIR) $(DOCDIR)
clean:
rm -f $(ALLTARGETS) $(RESCOMPTARGET) $(TEX2DOCTARGET) $(TEX2HTMLTARGET) *$(TARG_OBJEXTENSION) *$(HOST_OBJEXTENSION) *.p *.rsc tests/testlog testlog
cd doc_DE; $(MAKE) RM="rm -f" clean
cd doc_EN; $(MAKE) RM="rm -f" clean
#---------------------------------------------------------------------------
# create distributions
distrib: unjunk
mkdir ../asl-$(VERSION)
tar cf - $(DISTARCHFILES) | (cd ../asl-$(VERSION); tar xvf -)
cd ..; tar cvf asl-$(VERSION).tar asl-$(VERSION)
mv ../asl-$(VERSION).tar ./
rm -rf ../asl-$(VERSION)
gzip -9 -f asl-$(VERSION).tar
bindist: $(UNUMLAUTTARGET)
rm -rf as
mkdir as
cmd /cinstw32.cmd as\\bin as\\include as\\man as\\lib as\\doc
cd as; zip -9 -r ../as$(VERSION).zip *.*
zip -9 -r as$(VERSION).zip bin/cyg*
rm -rf as
#---------------------------------------------------------------------------
# for my own use only...
tape: unjunk
tar cvf $(TAPE) $(ARCHFILES)
disk: unjunk archive
mcopy -nvm asport.tar.gz a:ASPORT.TGZ
disks: unjunk archives
echo Insert disk 1...
read tmp
mcopy -nvm asport1.tar.gz a:ASPORT1.TGZ
echo Insert disk 2...
read tmp
mcopy -nvm asport2.tar.gz a:ASPORT2.TGZ
archive: unjunk asport.tar.gz
barchive: unjunk asport.tar.bz2
archives: unjunk asport1.tar.gz asport2.tar.gz
asport.tar.gz: $(ARCHFILES)
tar cvf asport.tar $(ARCHFILES)
gzip -9 -f asport.tar
asport.tar.bz2: $(ARCHFILES)
tar cvf asport.tar $(ARCHFILES)
bzip2 asport.tar
asport1.tar.gz: $(ARCH1FILES)
tar cvf asport1.tar $(ARCH1FILES)
gzip -9 -f asport1.tar
asport2.tar.gz: $(ARCH2FILES)
tar cvf asport2.tar $(ARCH2FILES)
gzip -9 -f asport2.tar
snap: unjunk
-mount /mo
-mkdir -p /mo/public/asport/snap_$(DATE)
cp -av $(ARCHFILES) /mo/public/asport/snap_$(DATE)
umount /mo
unjunk:
rm -f tmp.* n.c include/stddef56.inc asmpars.cas.c include/fileform* config.h test.h loc.c gennop.c \
nops.asm bind.* asmutils.* asmmessages.* filenums.* includelist.* tests/warnlog_* \
insttree.* flt1750.* t_65.* test87c8.* testst9.* testst7.* testtms7.* test3203.* \
ioerrors.new.c codeallg.* ASM*.c *_msg*.h p2BIN.* \
decodecmd.* ioerrors.* stringutil.* *split.c marks.c \
`find . -name "testlog" -print` \
`find . -name "*~" -print` \
`find . -name "core" -print` \
`find . -name "*.core" -print` \
`find . -name "*.lst" -print` \
`find . -name "lst" -print` \
`find . -name "*.noi" -print`
cd doc_DE; $(MAKE) clean RM="rm -f"
cd doc_EN; $(MAKE) clean RM="rm -f"
#---------------------------------------------------------------------------
.SUFFIXES: .c
.c$(TARG_OBJEXTENSION):
$(CC) $(ALLFLAGS) -c $*.c