-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile.in
275 lines (209 loc) · 9.36 KB
/
Makefile.in
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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
# bigforth makefile
DATE= $$(LC_ALL=C date '+%d%b%Y' | tr '[A-Z]' '[a-z]')
SRCREV=@PACKAGE_VERSION@
MINOSREV=1.5.0
BINREV=$(SRCREV)
PATREV=1.0.1
EWOODREV=1.0.2
ESHMREV=1.0.2
DOCREV=obsolete
package =
prefix = $(package)@prefix@
exec_prefix = @exec_prefix@
libdir = $(package)@libdir@/bigforth
srcdir = $(package)$(libdir)/src
bindir = $(package)@bindir@
TEXI2DVI = texi2dvi
DVI2PS = dvips -Z
TEXI2HTML = texi2html
MAKEINFO = makeinfo
INI = @INI@
XINI = @XINI@
INSTDIR = $(libdir)
BININSTDIR = $(bindir)
CC = @CC@ @ARCHFLAGS@
CP = cp
MV = mv
EXE = @EXEEXT@
CFLAGS = -g -O2 -fno-omit-frame-pointer -Wall -DVERSION_DATE='"'"$(DATE)"'"' -DINSTDIR='"'"$(INSTDIR)"'"' -fno-strict-aliasing @EXTFLAGS@
LDLIBS = @LIBS@
ARCH = @ARCH@
SHELL = @BASH@
WARNING =
#WARNING = warning on
BYE = cr bye
SAVE = ' .blk is .status warning on savesystem
XSAVE = warning on savesystem
OBJS = bigforth.o xbigforth.o linker.o
SOURCE = bigforth.c linker.S
KERNSRC = forth.fb target.fb
SYSSRC = assem486.fb stream.fb errore.fs hash.fs fileint.fb output.fb \
strings.fs savemod.fb tasker.fb vt100key.fs disass.fb \
tools.fb except.fs sedit.fb struct.fs lambda.fs idle.fs callback.fs \
startup.fb ftast.fb environ.fs random.fs version.h minos-version.h \
forth200x.fs
XCSRC = x.fs glconst.fs
XSRC = startx.fs minos.fs oof.fb x11.fs xpm.fs locals.fs editor.fs \
ediwind.fs edit.fs opengl.fs xstyle.fs status.fb splines.fb \
pipes.fb ptty.fs login.fs pixmap.fs png.fs browser.fs \
points.fs qsort.fs string.fs sincos.fs utf-8.fs xrender.fs \
$(XINI) xft-font.fs imlib.fs Estyle.fs substitute.fs i18n.fs i18n-months.fs \
minos-base.fs displays.fs minos-fonts.fs vdisplays.fs \
actors.fs widgets.fs minos-boxes.fs minos-buttons.fs \
minos-viewport.fs minos-windows.fs minos-complex.fs \
resources.fs minos-float.fs convert-m.sh float.fb theseus*.fs \
win32.fs win32ex.fs w95style.fs
BUILDSRC = configure.ac config.sub config.guess Makefile.in install-sh
EXTRAS = gpl-about.m menu.fs adjust.m adjust-path.fs fft.fb complex.fb fileop.fb
SRC = $(SOURCE) $(KERNSRC) $(SYSSRC) $(XCSRC) $(XSRC) $(BUILDSRC) $(XINI) $(XINI:%=%.in) $(INI) $(INI:%=%.in) $(EXTRAS)
MINIICONS = bigforth/icons/{dot-dir,dotdot-dir,script,dir,diropen,file,sym,INFO,WARNING,FATAL,QUESTION,ERROR,NONE}.png
all: build ok
build: bigforth$(EXE) forthker-$(ARCH)$(EXE) xbigforth$(EXE) xbigforth.fi theseus
ok: xbigforth.fi xbigforth$(EXE)
-@./xbigforth -e '." *** bigFORTH build successful ***" cr bye'
theseus: theseus.fs
sed -e "s,^#! xbigforth,#! $(BININSTDIR)/xbigforth$(EXE)," <theseus.fs >theseus
version.h: Makefile.in
echo '"'$(SRCREV)'"' >$@
minos-version.h: Makefile.in
echo '"'$(MINOSREV)'"' >$@
%.o: %.c version.h
$(CC) $(CFLAGS) -c $<
xbigforth.o: bigforth.c version.h minos-version.h
$(CC) $(CFLAGS) -DMINOS -c $< -o $@
%.o: %.S
$(CC) -c $<
bigforth$(EXE): bigforth.o linker.o
$(CC) $(CFLAGS) bigforth.o linker.o $(LDLIBS) -o bigforth
strip bigforth$(EXE)
forthker-$(ARCH)$(EXE): bigforth$(EXE)
$(CP) $< $@
xbigforth$(EXE): xbigforth.o linker.o
$(CC) $(CFLAGS) @WINDOWS@ xbigforth.o linker.o $(LDLIBS) -o $@
strip $@
scr2str$(EXE) str2scr$(EXE): scr2str.c
$(CC) $(CFLAGS) $< -o scr2str$(EXE)
ln -s scr2str$(EXE) str2scr$(EXE)
forthker-%.fi: $(KERNSRC)
-@$(CP) $@ $@~
./bigforth -e ": :$* ; include forth.fb save-target forthker-$* $(BYE)"
bigforth.fi: forthker-$(ARCH).fi $(SYSSRC) Makefile
-@$(MV) $@ $@~
env LIBDIR=$(libdir) SRC=$(srcdir) ./forthker-$(ARCH) -e "$(WARNING) include startup.fb $(SAVE) bigforth $(BYE)"
xbigforth.fi: bigforth.fi xconst.fm glconst.fm $(XSRC) $(INI)
-@$(MV) $@ $@~
./bigforth -e "$(WARNING) use x.fs use glconst.fs use float.fb include startx.fs $(XSAVE) xbigforth $(BYE)"
xconst.fm: $(XCSRC) forthker-$(ARCH).fi $(SYSSRC)
-@$(MV) $@ $@~
./bigforth -e "$(WARNING) include x.fs m' xconst savemod xconst $(BYE)"
glconst.fm: $(XCSRC) forthker-$(ARCH).fi $(SYSSRC)
-@$(MV) $@ $@~
./bigforth -e "$(WARNING) use x.fs include glconst.fs m' glconst savemod glconst $(BYE)"
float.fm: float.fb forthker-$(ARCH).fi $(SYSSRC)
-@$(MV) $@ $@~
./bigforth -e "$(WARNING) use x.fs use glconst.fs include float.fb m' float savemod float $(BYE)"
CPYDIST = bigforth/{README,COPYING,CREDITS,LGPLv3}
DOSDIST = bigforth/{forthker-*,bigforth,xbigforth}$(EXE) bigforth/forthker-*.fi bigforth/{version.h,minos-version.h}
DOCDIST = bigforth/help/{*.html,[a-z]*.gif,*.jpg,*.sh} bigforth/doc/bigforth.texi
EXAMPLEDIST = bigforth/3dskull/{*.fs,*.m,*.dat} $(DRAGONDIST)
ICONDIST = bigforth/icons/*.png bigforth/icons/minos1+.icn
SRCDIST = bigforth/{BUGS,ToDo,config.guess,config.sub,install-sh,configure{,.ac},{Makefile,$(INI),$(XINI)}{,.in},[^E]*.f[sb],Estyle.fs,*.m,bigforth.c,scr2str.c,*.S,iss.sh,tips.txt,forthker-*.fi,xpmtoicn,convert-m.sh} $(ICONDIST)
MINISRCDIST = $(SRC:%=bigforth/%)
DRAGONDIST = bigforth/pattern/dragon{,-back,-head,-wing,-claw}.png \
bigforth/pattern/{bark,normal-w1,back,focus}.png
PATDIST = bigforth/pattern/{back,backtext,dark,focus,light,normal}{-c,-h,-p,-w,-w1,-m,-d,}.ppm \
EDIST1 = bigforth/Estyle/wood/{Makefile,*.inc} \
bigforth/Estyle/wood/{button,arrow,[hv]slider,[rt]button}-[dfps][blmrt]*.{pov,png} bigforth/Estyle-wood.fs
EDIST2 = bigforth/Estyle/ShinyMetal/* bigforth/Estyle-ShinyMetal.fs
COMPRESS = J
TAR = tar -$(COMPRESS)chf
COMPSUB = .xz
docdist: all
cd ..; $(TAR) bigforth/bigforth-doc-"$(DOCREV)".tar$(COMPSUB) $(DOCDIST)
srcdist:
cd ..; $(TAR) bigforth/bigforth-"$(SRCREV)".tar$(COMPSUB) $(SRCDIST) $(CPYDIST) $(EXAMPLEDIST)
minidist:
cd ..; $(TAR) bigforth/bigforth-mini-"$(SRCREV)".tar$(COMPSUB) $(MINISRCDIST) $(CPYDIST) $(DOSDIST) $(MINIICONS)
patdist: all
cd ..; $(TAR) bigforth/bigforth-pattern-"$(PATREV)".tar$(COMPSUB) $(PATDIST)
edist1: all
cd ..; $(TAR) bigforth/bigforth-edata-wood-"$(EWOODREV)".tar$(COMPSUB) $(EDIST1)
edist2: all
cd ..; $(TAR) bigforth/bigforth-edata-ShinyMetal-"$(ESHMREV)".tar$(COMPSUB) $(EDIST2)
dist: all docdist srcdist patdist edist1 edist2
dist-files:
@echo $(SRCDIST) $(DOCDIST) $(CPYDIST) $(DOSDIST) $(EXAMPLEDIST)
minidist-files:
@echo $(MINISRCDIST) $(CPYDIST) $(DOSDIST) $(MINIICONS)
INSTDIRS = pattern icons help src Estyle Estyle/wood Estyle/ShinyMetal
install: build
@install -d $(DESTDIR)$(BININSTDIR)
@install -d $(DESTDIR)$(INSTDIR)
@for i in $(INSTDIRS); do install -d $(DESTDIR)$(INSTDIR)/$$i; done
@install -m 644 {forthker-$(ARCH),bigforth,xbigforth}.fi {glconst,xconst}.fm $(DESTDIR)$(INSTDIR)
@install -m 644 $(INI) $(DESTDIR)$(INSTDIR)
@install -m 644 $(XINI) $(DESTDIR)$(INSTDIR)
@install -m 755 {forthker-$(ARCH),bigforth,xbigforth}$(EXE) convert-m.sh $(DESTDIR)$(BININSTDIR)
@install -m 755 theseus $(DESTDIR)$(BININSTDIR)/theseus
@$(RM) theseus
@install -m 644 {BUGS,ToDo,README,COPYING,LGPLv3,CREDITS,Makefile,*.f[sb],*.m,*.c,*.S,iss.sh,tips.txt} $(DESTDIR)$(INSTDIR)/src
@install -m 644 icons/*.png $(DESTDIR)$(INSTDIR)/icons
@install -m 644 pattern/dragon{,-back,-claw,-head,-wing}.png pattern/bark.png $(DESTDIR)$(INSTDIR)/pattern
@if [ -d help ]; then install -m 644 help/{*.html,[a-z]*.gif,*.jpg,*.sh} $(DESTDIR)$(INSTDIR)/help; fi
@if [ -f pattern/back-p.ppm ]; then install -m 644 pattern/{back,backtext,dark,focus,light,normal}{-c,-h,-p,-w,-w1,-m,-d,}.ppm $(DESTDIR)$(INSTDIR)/pattern; fi
@if [ -d Estyle/wood ]; then install -m 644 Estyle/wood/{button,arrow,[hv]slider,[rt]button}-[dfps][blmrt]*.png $(DESTDIR)$(INSTDIR)/Estyle/wood; fi
@if [ -d Estyle/ShinyMetal ]; then install -m 644 Estyle/ShinyMetal/* $(DESTDIR)$(INSTDIR)/Estyle/ShinyMetal; fi
configure: configure.ac
autoconf
config.status: configure
if [ -f config.status ]; \
then ./config.status --recheck; \
else ./configure; fi
Makefile: Makefile.in config.status
CONFIG_FILES="$@" ./config.status
$(XINI): $(XINI).in config.status
CONFIG_FILES="$@" ./config.status
$(INI): $(INI).in config.status
CONFIG_FILES="$@" ./config.status
# This is the documentation part, and is not ready yet
doc/bigforth.dvi doc/bigforth.fns: doc/bigforth.texi
cd doc; $(TEXI2DVI) bigforth.texi
doc/bigforth.ps: doc/bigforth.dvi
$(DVI2PS) doc/bigforth.dvi -o $@
doc/bigforth.info doc/bigforth.info-*: doc/bigforth.texi
-cd doc; $(MAKEINFO) bigforth.texi
doc/bigforth.txt: doc/bigforth.texi
-cd doc; $(MAKEINFO) --no-headers --no-split bigforth.texi >bigforth.txt
info: doc/bigforth.info
ps: doc/bigforth.ps
html: doc/bigforth.texi
-$(RMTREE) html
-mkdir html
cd html; $(TEXI2HTML) -menu -split_node ../doc/bigforth.texi
doc: doc/bigforth.ps html doc/bigforth.txt
# make debian
debian.control: Makefile
echo "Source: bigforth" >$@
echo "Section: programming" >>$@
echo "Priority: optional" >>$@
echo "Maintainer: Bernd Paysan <[email protected]>" >>$@
echo "Build-Depends: debhelper (>= 4.1.16), build-essential, gcc" >>$@
echo "Package: bigforth" >>$@
echo "Version: $(SRCREV)" >>$@
echo "Architecture: i386" >>$@
echo "Description: bigFORTH+MINOS" >>$@
echo " bigFORTH is a native code Forth. It is available for Linux and" >>$@
echo " Windows 2000/XP under GPL. The most striking feature is the" >>$@
echo " graphical user interface MINOS (GUI in Forth) and the form editor" >>$@
echo " Theseus (Theseus is still beta)." >>$@
bigforth.deb: all debian.control
-rm -rf debian
mkdir debian
make package=debian install
(cd debian; find . -name '*' -exec md5sum '{}' ';') >md5sums
mkdir debian/DEBIAN
cp debian.control debian/DEBIAN/control
cp md5sums debian/DEBIAN
dpkg-deb --build debian
mv debian.deb bigforth_$(SRCREV)_i386.deb
rm -rf debian.control md5sums debian