-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
154 lines (109 loc) · 4.38 KB
/
Makefile.am
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
## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = foreign
EXTRA_DIST = wpurc README.base
SUBDIRS = bin doc src
######################################################################
# documentation rules
.PHONY: docu sgml txt doc html dvi ps ps.gz ps.zip
docu sgml txt doc html dvi ps ps.gz ps.zip:
cd doc && $(MAKE) $@
#####################################################################
# WWW page rules
index.html indexpart.html:
cd doc && $(MAKE) $@
mv doc/$@ $@
######################################################################
# package compiling rules (binary packages, mostly cross-compile)
# All direcories are hard-coded in here. You _will_ have to change them.
linux: clean
mv config.status config.status.orig
-mkdir -p systems/i486-linux
cd systems/i486-linux && \
CC=/usr/bin/gcc \
CXX=/usr/bin/g++ \
../../configure --host=i486-linux
cd systems/i486-linux && $(MAKE)
mv config.status.orig config.status
cp systems/i486-linux/src/lmpc $(top_srcdir)/bin/lmpc
cp systems/i486-linux/src/demcut $(top_srcdir)/bin/demcut
cp systems/i486-linux/src/dbs $(top_srcdir)/bin/dbs
linux-strip: linux
/usr/i486-linux/bin/strip $(top_srcdir)/bin/lmpc
/usr/i486-linux/bin/strip $(top_srcdir)/bin/demcut
/usr/i486-linux/bin/strip $(top_srcdir)/bin/dbs
go32_TARGET=i386-pc-msdosdjgpp
go32_PREFIX=/usr/self/go32
go32: clean
mv config.status config.status.orig
-mkdir -p systems/$(go32_TARGET)
cd systems/$(go32_TARGET) && \
CC=$(go32_PREFIX)/$(go32_TARGET)/bin/gcc \
CXX=$(go32_PREFIX)/$(go32_TARGET)/bin/g++ \
RANLIB=$(go32_PREFIX)/$(go32_TARGET)/bin/ranlib \
../../configure --host=$(go32_TARGET)
cd systems/$(go32_TARGET) && $(MAKE)
mv config.status.orig config.status
cp systems/$(go32_TARGET)/src/lmpc.exe $(top_srcdir)/bin/lmpc.exe
cp systems/$(go32_TARGET)/src/demcut.exe $(top_srcdir)/bin/demcut.exe
go32-strip: go32
$(go32_PREFIX)/$(go32_TARGET)/bin/strip $(top_srcdir)/bin/lmpc.exe
$(go32_PREFIX)/$(go32_TARGET)/bin/strip $(top_srcdir)/bin/demcut.exe
cygwin_TARGET=i386-pc-cygwin32
cygwin_PREFIX=/usr/self/cygnus
cygwin: clean
mv config.status config.status.orig
-mkdir -p systems/$(cygwin_TARGET)
cd systems/$(cygwin_TARGET) && \
CC=$(cygwin_PREFIX)/bin/$(cygwin_TARGET)-gcc \
CXX=$(cygwin_PREFIX)/bin/$(cygwin_TARGET)-g++ \
RANLIB=$(cygwin_PREFIX)/bin/$(cygwin_TARGET)-ranlib \
../../configure --host=$(cygwin_TARGET)
cd systems/$(cygwin_TARGET) && $(MAKE)
mv config.status.orig config.status
cp systems/$(cygwin_TARGET)/src/lmpc $(top_srcdir)/bin/lmpc32.exe
cp systems/$(cygwin_TARGET)/src/demcut $(top_srcdir)/bin/demcut32.exe
cygwin-strip: cygwin
$(cygwin_PREFIX)/$(cygwin_TARGET)/bin/strip $(top_srcdir)/bin/lmpc32.exe
$(cygwin_PREFIX)/$(cygwin_TARGET)/bin/strip $(top_srcdir)/bin/demcut32.exe
mingw32_TARGET=i386-pc-mingw32
mingw32_PREFIX=/usr/self/cygnus
mingw32: clean
mv config.status config.status.orig
-mkdir -p systems/$(mingw32_TARGET)
cd systems/$(mingw32_TARGET) && \
CC=$(cygwin_PREFIX)/bin/$(cygwin_TARGET)-gcc \
CXX=$(cygwin_PREFIX)/bin/$(cygwin_TARGET)-g++ \
RANLIB=$(cygwin_PREFIX)/bin/$(cygwin_TARGET)-ranlib \
CFLAGS=-mno-cygwin \
LDFLAGS=-mno-cygwin \
../../configure --host=$(mingw32_TARGET)
cd systems/$(mingw32_TARGET) && $(MAKE)
mv config.status.orig config.status
cp systems/$(mingw32_TARGET)/src/lmpc $(top_srcdir)/bin/lmpcm.exe
cp systems/$(mingw32_TARGET)/src/demcut $(top_srcdir)/bin/demcutm.exe
mingw32-strip: mingw32
$(cygwin_PREFIX)/$(cygwin_TARGET)/bin/strip $(top_srcdir)/bin/lmpcm.exe
$(cygwin_PREFIX)/$(cygwin_TARGET)/bin/strip $(top_srcdir)/bin/demcutm.exe
######################################################################
# distribution rules
dist-hook README:
$(WPU) --set ACTION=readme --set SRCDIR=$(srcdir) --set PACK=s $(srcdir)/README.base README
.PHONY: pack s l d w m f
pack: dist l d w m f
l d w m f:
$(WPU) --set ACTION=readme --set PACK=$@ README.base README
$(WPU) --set ACTION=packaging --set PACK=$@
s: dist
l: linux-strip txt
d: go32-strip doc
w: cygwin-strip doc
m: mingw32-strip doc
f: linux-strip go32-strip cygwin-strip mingw32-strip txt doc ps
######################################################################
# publishing rules
.PHONY: upload
upload: pack html index.html indexpart.html
$(WPU) --set ACTION=upload
######################################################################
# removing additionals
CLEANFILES=index.html indexpart.html