Initial commit of newLISP.
[newlisp.git] / Makefile
blob4b972fb6a3610bf61b4652d6cf6711fe2c682f35
2 # USAGE:
4 # make <option>
6 # to see a list of all options, enter 'make' without any options
8 # Note! on some systems do 'gmake' instead of 'make' (most BSD)
10 # for 'make install' you have to login as 'root' else do 'make install_home'
11 # note that 'make install_home' will not install guiserver files which
12 # must be in /usr/share/newlisp in MacOX X and UNIX machines
14 # to make the distribution archive: 'make dist'
16 # to clean up (delete .o *~ core etc.): 'make clean'
19 # Compile flags used:
21 # NANOSLEEP enables capability to return time in milli secs in 'time'
22 # READLINE enables commandline editing and history, requires readline lib
23 # NOIMPPORT disables the 'import' shared library import primitive
25 # Regular expressions now on all platforms Perl Compatible Regular Expresssions PCRE
26 # see http://www.pcre.org. PCRE can be localized to other languages than English
27 # by generating different character tables, see documentation at www.pcre.org
28 # and file LOCALIZATION for details
31 VERSION = 9.3.3
32 INT_VERSION = 9303
33 GUISERVER = /usr/share/newlisp/guiserver
35 default:
36 ./build
38 help:
39 @echo "Do one of the following:"
40 @echo
41 @echo " make linux # newlisp for LINUX (tested Debian & Fedora)"
42 @echo " make linux_utf8 # newlisp for LINUX UTF-8"
43 @echo " make linux_readline # newlisp for LINUX with readline support"
44 @echo " make linux_debian # newlisp for LINUX with readline support for debian"
45 @echo " make linux_utf8_readline # newlisp for LINUX UTF-8 with readline support"
46 @echo " make linux_lib # newlisp.so as shared library for LINUX"
47 @echo " make linux_lib_utf8 # newlisp.so as shared library for LINUX with UTF-8"
48 @echo " make linux64ILP32 # newlisp for LINUX 64 with 32-bit pointers / AMD64"
49 @echo " make linux64LP64 # newlisp for LINUX 64 with 64-bit pointers / AMD64"
50 @echo " make tru64 # newlisp for HP tru64 with 32 bit pointers - read doc/TRU64BUILD"
51 @echo " make bsd # newlisp for FreeBSD and OpenBSD"
52 @echo " make netbsd # newlisp for NetBSD (same as previous w/o readline)"
53 @echo " make bsd_lib # newlisp.so as shared library for FreeBSD, OpenBSD, NetBSD"
54 @echo " make darwin # newlisp for Mac OSX v.10.4 or later, readline support"
55 @echo " make darwin_utf8 # newlisp for Mac OSX v.10.4 or later, readline and UTF-8 support"
56 @echo " make darwin_lib # newlisp for Mac OSX v.10.3 or later as shared library"
57 @echo " make universal # newlisp for Mac OSX v.10.3 universal version ppc+intel"
58 @echo " make universal_utf8 # newlisp for Mac OSX v.10.3 universal version ppc+intel UTF-8"
59 @echo " make solaris # newLISP for Sun SOLARIS (tested on Sparc)"
60 @echo " make solarisLP64 # newLISP for Sun SOLARIS 64-bit LP64 (tested on Sparc)"
61 @echo " make solaris_utf8 # newLISP for Sun SOLARIS UTF-8 (tested on Sparc)"
62 @echo " make true64 # newLISP for tru64 UNIX LP64 tested on Alpha CPU"
63 @echo " make mingw # newlisp.exe for Win32 (MinGW compiler)"
64 @echo " make mingw_utf8 # newlisp.exe for Win32 UTF-8 (MinGW icompiler)"
65 @echo " make mingwdll # newlisp.dll for Win32 (MinGW compiler)"
66 @echo " make mingwdll_utf8 # newlisp.dll for Win32 UTF-8 (MinGW compiler)"
67 @echo " make os2 # newlisp for OS/2 GCC 3.3.5 with libc061.dll"
68 @echo
69 @echo " make install # install on LINUX/UNIX in /usr/bin and /usr/share (need to be root)"
70 @echo " make uninstall # uninstall on LINUX/UNIX from /usr/bin and /usr/share (need to be root)"
71 @echo " make install_home # install on LINUX/UNIX in users home directory "
72 @echo " make uninstall_home # uninstall on LINUX/UNIX from users home directory "
73 @echo
74 @echo " make clean # remove all *.o and .tar files etc. USE BETWEEN FLAVORS!"
75 @echo " make test # run qa-dot, qa-net and qa-xml test scripts"
76 @echo
77 @echo "Note! on some systems use gmake instead of make"
78 @echo "readline is for commandline editing support and requires libreadline"
79 @echo "only installed by default on BSDs (FreeBSD, NetBSD, OpenBSD, MacOS X/Darwin)"
80 @echo "If there is no UTF-8 option for your OS, consult makefile_xxx"
82 linux:
83 make -f makefile_linux
85 linux_utf8:
86 make -f makefile_linux_utf8
88 linux_readline:
89 make -f makefile_linux_readline
91 linux_debian:
92 make -f makefile_debian
94 debian:
95 make -f makefile_debian
97 linux_utf8_readline:
98 make -f makefile_linux_utf8_readline
100 debian_utf8:
101 make -f makefile_linux_utf8_readline
103 linux_lib:
104 make -f makefile_linux_lib
106 linux_lib_utf8:
107 make -f makefile_linux_lib_utf8
109 linux64ILP32:
110 make -f makefile_linux64ILP32
112 linux64LP64:
113 make -f makefile_linux64LP64
115 tru64:
116 make -f makefile_tru64
118 bsd:
119 make -f makefile_bsd
121 netbsd:
122 make -f makefile_netbsd
124 bsd_lib:
125 make -f makefile_bsd_lib
127 darwin_lib:
128 make -f makefile_darwin_lib
130 universal:
131 make -f makefile_universal
133 universal_utf8:
134 make -f makefile_universal_utf8
136 darwin:
137 make -f makefile_darwin
139 darwin_utf8:
140 make -f makefile_darwin_utf8
142 solaris:
143 make -f makefile_solaris
145 solarisLP64:
146 make -f makefile_solarisLP64
148 solaris_utf8:
149 make -f makefile_solaris_utf8
151 mingw:
152 make -f makefile_mingw
154 mingw_utf8:
155 make -f makefile_mingw_utf8
157 mingwdll:
158 make -f makefile_mingwdll
160 mingwdll_utf8:
161 make -f makefile_mingwdll_utf8
163 os2:
164 make -f makefile_os2
166 winall:
167 make clean
168 make -f makefile_mingw
169 make clean
170 make -f makefile_mingwdll
171 make clean
172 ./newlisp qa-dot
174 winall_utf8:
175 make clean
176 make -f makefile_mingw_utf8
177 make clean
178 make -f makefile_mingwdll_utf8
179 make clean
180 ./newlisp qa-dot
183 wings:
184 make -f makefile_wings
186 # this cleans up the distribution directory for a clean build
187 clean:
188 -rm *~ *.bak *.o *.obj *.map core *.tgz TEST
189 -rm guiserver/*.class doc/*~ util/*~ examples/*~ modules/*~
190 -rm doc/*.bak util/*.bak examples/*.bak modules/*.bak
191 -chmod 644 *.h *.c *.lsp Makefile makefile*
192 -chmod 755 build configure examples/*
193 -chmod 644 doc/* modules/*.lsp examples/*.lsp examples/*.html
194 -chmod 644 guiserver/*
195 -chmod 755 guiserver/images
196 -chmod 644 guiserver/images/*
197 -chmod 755 guiserver/java
198 -chmod 644 guiserver/java/*
200 # run test scripts
201 test:
202 ./newlisp qa-dot
203 ./newlisp qa-xml
204 ./newlisp qa-setsig
205 ./newlisp qa-net
207 # directory definitions
208 datadir=$(DESTDIR)/usr/share
209 bindir=$(DESTDIR)/usr/bin
210 mandir=$(DESTDIR)/usr/share/man
212 GUISERVER = /usr/share/newlisp/guiserver
214 # this is the standard install in /usr/bin and usr/share
215 # which as to be done as 'root' with supersuser permissions
216 # for an install in your home directory use make install_home
218 # One-line description for distribution packages:
219 # newLISP is a LISP like, general purpose scripting language.
221 # Longer description for distribution packages:
222 # newLISP is a scripting language for developing web applications and programs
223 # in general and in the domains of artificial intelligence (AI) and statistics.
225 install:
226 -install -d $(datadir)/newlisp
227 -install -d $(datadir)/newlisp/modules
228 -install -d $(datadir)/newlisp/util
229 -install -d $(datadir)/doc/newlisp
230 -install -m 755 newlisp $(bindir)/newlisp
231 -install -m 644 examples/init.lsp.example $(datadir)/newlisp/init.lsp.example
232 -install -m 755 util/newlispdoc $(bindir)/newlispdoc
233 -install -m 644 util/syntax.cgi $(datadir)/newlisp/util/syntax.cgi
234 -install -m 644 util/newlisp.vim $(datadir)/newlisp/util/newlisp.vim
235 -install -m 644 util/link.lsp $(datadir)/newlisp/util/link.lsp
236 -install -m 644 util/httpd-conf.lsp $(datadir)/newlisp/util/httpd-conf.lsp
237 -install -m 644 doc/COPYING $(datadir)/doc/newlisp/COPYING
238 -install -m 644 doc/CREDITS $(datadir)/doc/newlisp/CREDITS
239 -install -m 644 doc/newlisp_manual.html $(datadir)/doc/newlisp/newlisp_manual.html
240 -install -m 644 doc/newlisp_index.html $(datadir)/doc/newlisp/newlisp_index.html
241 -install -m 644 doc/manual_frame.html $(datadir)/doc/newlisp/manual_frame.html
242 -install -m 644 doc/CodePatterns.html $(datadir)/doc/newlisp/CodePatterns.html
243 -install -m 644 doc/newLISPdoc.html $(datadir)/doc/newlisp/newLISPdoc.html
244 -install -m 644 doc/newLISP-9.3-Release.html $(datadir)/doc/newlisp/newLISP-9.3-Release.html
245 -install -m 644 doc/newlisp.1 $(mandir)/man1/newlisp.1
246 -install -m 644 doc/newlispdoc.1 $(mandir)/man1/newlispdoc.1
247 -install -m 644 modules/cgi.lsp $(datadir)/newlisp/modules/cgi.lsp
248 -install -m 644 modules/crypto.lsp $(datadir)/newlisp/modules/crypto.lsp
249 -install -m 644 modules/ftp.lsp $(datadir)/newlisp/modules/ftp.lsp
250 -install -m 644 modules/gmp.lsp $(datadir)/newlisp/modules/gmp.lsp
251 -install -m 644 modules/infix.lsp $(datadir)/newlisp/modules/infix.lsp
252 -install -m 644 modules/mysql.lsp $(datadir)/newlisp/modules/mysql.lsp
253 -install -m 644 modules/mysql5.lsp $(datadir)/newlisp/modules/mysql5.lsp
254 -install -m 644 modules/odbc.lsp $(datadir)/newlisp/modules/odbc.lsp
255 -install -m 644 modules/pop3.lsp $(datadir)/newlisp/modules/pop3.lsp
256 -install -m 644 modules/postscript.lsp $(datadir)/newlisp/modules/postscript.lsp
257 -install -m 644 modules/smtp.lsp $(datadir)/newlisp/modules/smtp.lsp
258 -install -m 644 modules/sqlite3.lsp $(datadir)/newlisp/modules/sqlite3.lsp
259 -install -m 644 modules/stat.lsp $(datadir)/newlisp/modules/stat.lsp
260 -install -m 644 modules/unix.lsp $(datadir)/newlisp/modules/unix.lsp
261 -install -m 644 modules/xmlrpc-client.lsp $(datadir)/newlisp/modules/xmlrpc-client.lsp
262 -install -m 644 modules/zlib.lsp $(datadir)/newlisp/modules/zlib.lsp
263 # GUI-Server install
264 -install -d $(datadir)/newlisp/guiserver
265 -install -d $(datadir)/doc/newlisp/guiserver
266 -install -m 755 guiserver/newlisp-edit.lsp $(bindir)/newlisp-edit
267 -install -m 644 guiserver/guiserver.jar $(datadir)/newlisp/guiserver.jar
268 -install -m 644 guiserver/guiserver.lsp $(datadir)/newlisp/guiserver.lsp
269 -install -m 644 guiserver/COPYING $(datadir)/doc/newlisp/guiserver/COPYING
270 -install -m 644 guiserver/index.html $(datadir)/doc/newlisp/guiserver/index.html
271 -install -m 644 guiserver/guiserver.lsp.html $(datadir)/doc/newlisp/guiserver/guiserver.lsp.html
272 -install -m 644 guiserver/allfonts-demo.lsp $(datadir)/newlisp/guiserver/allfonts-demo.lsp
273 -install -m 644 guiserver/animation-demo.lsp $(datadir)/newlisp/guiserver/animation-demo.lsp
274 -install -m 644 guiserver/border-layout-demo.lsp $(datadir)/newlisp/guiserver/border-layout-demo.lsp
275 -install -m 644 guiserver/button-demo.lsp $(datadir)/newlisp/guiserver/button-demo.lsp
276 -install -m 644 guiserver/clipboard-demo.lsp $(datadir)/newlisp/guiserver/clipboard-demo.lsp
277 -install -m 644 guiserver/cursor-demo.lsp $(datadir)/newlisp/guiserver/cursor-demo.lsp
278 -install -m 644 guiserver/drag-demo.lsp $(datadir)/newlisp/guiserver/drag-demo.lsp
279 -install -m 644 guiserver/font-demo.lsp $(datadir)/newlisp/guiserver/font-demo.lsp
280 -install -m 644 guiserver/frameless-demo.lsp $(datadir)/newlisp/guiserver/frameless-demo.lsp
281 -install -m 644 guiserver/html-demo.lsp $(datadir)/newlisp/guiserver/html-demo.lsp
282 -install -m 644 guiserver/image-demo.lsp $(datadir)/newlisp/guiserver/image-demo.lsp
283 -install -m 644 guiserver/mouse-demo.lsp $(datadir)/newlisp/guiserver/mouse-demo.lsp
284 -install -m 644 guiserver/move-resize-demo.lsp $(datadir)/newlisp/guiserver/move-resize-demo.lsp
285 -install -m 644 guiserver/pinballs-demo.lsp $(datadir)/newlisp/guiserver/pinballs-demo.lsp
286 -install -m 644 guiserver/properties-demo.lsp $(datadir)/newlisp/guiserver/properties-demo.lsp
287 -install -m 644 guiserver/rotation-demo.lsp $(datadir)/newlisp/guiserver/rotation-demo.lsp
288 -install -m 644 guiserver/shapes-demo.lsp $(datadir)/newlisp/guiserver/shapes-demo.lsp
289 -install -m 644 guiserver/sound-demo.lsp $(datadir)/newlisp/guiserver/sound-demo.lsp
290 -install -m 644 guiserver/stroke-demo.lsp $(datadir)/newlisp/guiserver/stroke-demo.lsp
291 -install -m 644 guiserver/tabs-demo.lsp $(datadir)/newlisp/guiserver/tabs-demo.lsp
292 -install -m 644 guiserver/textrot-demo.lsp $(datadir)/newlisp/guiserver/textrot-demo.lsp
293 -install -m 644 guiserver/widgets-demo.lsp $(datadir)/newlisp/guiserver/widgets-demo.lsp
294 -install -m 644 guiserver/word-count.lsp $(datadir)/newlisp/guiserver/word-count.lsp
295 -install -m 644 guiserver/uppercase.lsp $(datadir)/newlisp/guiserver/uppercase.lsp
298 uninstall:
299 -rm $(bindir)/newlisp
300 -rm $(bindir)/newlispdoc
301 -rm $(bindir)/newlisp-edit
302 -rm -rf $(datadir)/newlisp
303 -rm -rf $(datadir)/doc/newlisp
304 -rm $(mandir)/man1/newlisp.1
305 -rm $(mandir)/man1/newlispdoc.1
307 # installs newLISP in home directory, but without guiserver files except
308 # documentation. To make guiserver run from ~/share/newlisp. The loading
309 # from guiserver.lsp at the beginning of a guiserver app and loading
310 # of guiserver.jar from inside of guiserver.lsp have to be changed.
312 install_home:
313 -install -d $(HOME)/bin
314 -install -d $(HOME)/share/newlisp
315 -install -d $(HOME)/share/newlisp/modules
316 -install -d $(HOME)/share/newlisp/util
317 -install -d $(HOME)/share/doc/newlisp/
318 -install -d $(HOME)/share/doc/newlisp/guiserver
319 -install -d $(HOME)/share/man/man1
320 -install -m 755 newlisp $(HOME)/bin/newlisp
321 -install -m 644 examples/init.lsp.example $(HOME)/share/newlisp/init.lsp.example
322 -install -m 755 util/newlispdoc $(HOME)/bin/newlispdoc
323 -install -m 644 util/syntax.cgi $(HOME)/share/newlisp/util/syntax.cgi
324 -install -m 644 util/newlisp.vim $(HOME)/share/newlisp/util/newlisp.vim
325 -install -m 644 util/link.lsp $(HOME)/share/newlisp/util/link.lsp
326 -install -m 644 util/httpd-conf.lsp $(HOME)/share/newlisp/util/httpd-conf.lsp
327 -install -m 644 guiserver/index.html $(HOME)/share/doc/newlisp/guiserver/index.html
328 -install -m 644 guiserver/guiserver.lsp.html $(HOME)/share/doc/newlisp/guiserver/guiserver.lsp.html
329 -install -m 644 doc/COPYING $(HOME)/share/doc/newlisp/COPYING
330 -install -m 644 doc/COPYING $(HOME)/share/doc/newlisp/guiserver/COPYING
331 -install -m 644 doc/CREDITS $(HOME)/share/doc/newlisp/CREDITS
332 -install -m 644 doc/newlisp_manual.html $(HOME)/share/doc/newlisp/newlisp_manual.html
333 -install -m 644 doc/newlisp_index.html $(HOME)/share/doc/newlisp/newlisp_index.html
334 -install -m 644 doc/manual_frame.html $(HOME)/share/doc/newlisp/manual_frame.html
335 -install -m 644 doc/CodePatterns.html $(HOME)/share/doc/newlisp/CodePatterns.html
336 -install -m 644 doc/newLISPdoc.html $(HOME)/share/doc/newlisp/newLISPdoc.html
337 -install -m 644 doc/newLISP-9.3-Release.html $(HOME)/share/doc/newlisp/newLISP-9.3-Release.html
338 -install -m 644 doc/newlisp.1 $(HOME)/share/man/man1/newlisp.1
339 -install -m 644 doc/newlispdoc.1 $(HOME)/share/man/man1/newlispdoc.1
340 -install -m 644 modules/cgi.lsp $(HOME)/share/newlisp/modules/cgi.lsp
341 -install -m 644 modules/crypto.lsp $(HOME)/share/newlisp/modules/crypto.lsp
342 -install -m 644 modules/ftp.lsp $(HOME)/share/newlisp/modules/ftp.lsp
343 -install -m 644 modules/gmp.lsp $(HOME)/share/newlisp/modules/gmp.lsp
344 -install -m 644 modules/infix.lsp $(HOME)/share/newlisp/modules/infix.lsp
345 -install -m 644 modules/mysql.lsp $(HOME)/share/newlisp/modules/mysql.lsp
346 -install -m 644 modules/mysql5.lsp $(HOME)/share/newlisp/modules/mysql5.lsp
347 -install -m 644 modules/odbc.lsp $(HOME)/share/newlisp/modules/odbc.lsp
348 -install -m 644 modules/pop3.lsp $(HOME)/share/newlisp/modules/pop3.lsp
349 -install -m 644 modules/postscript.lsp $(HOME)/share/newlisp/modules/postscript.lsp
350 -install -m 644 modules/smtp.lsp $(HOME)/share/newlisp/modules/smtp.lsp
351 -install -m 644 modules/sqlite3.lsp $(HOME)/share/newlisp/modules/sqlite3.lsp
352 -install -m 644 modules/stat.lsp $(HOME)/share/newlisp/modules/stat.lsp
353 -install -m 644 modules/unix.lsp $(HOME)/share/newlisp/modules/unix.lsp
354 -install -m 644 modules/xmlrpc-client.lsp $(HOME)/share/newlisp/modules/xmlrpc-client.lsp
355 -install -m 644 modules/zlib.lsp $(HOME)/share/newlisp/modules/zlib.lsp
358 uninstall_home:
359 -rm -rf $(HOME)/share/newlisp
360 -rm -rf $(HOME)/share/doc/newlisp
361 -rm $(HOME)/share/man/man1/newlisp.1
362 -rm $(HOME)/bin/newlisp
363 -rm $(HOME)/bin/newlispdoc
365 # this makes the distribution newlisp-x.x.x.tgz from inside newlisp-x.x.x directory
366 # you shouldn't use this, but send me the changed files with your contribution/fixes
367 # to lutz@nuevatec.com put the word: newlisp in the subject line
369 dist:
370 -mkdir newlisp-$(VERSION)
371 -mkdir newlisp-$(VERSION)/guiserver
372 -mkdir newlisp-$(VERSION)/guiserver/images
373 -mkdir newlisp-$(VERSION)/guiserver/java
374 -mkdir newlisp-$(VERSION)/modules
375 -mkdir newlisp-$(VERSION)/examples
376 -mkdir newlisp-$(VERSION)/doc
377 -mkdir newlisp-$(VERSION)/util
378 cp README newlisp-$(VERSION)
379 cp nl*.c newlisp.c *.h pcre*.c newlisp-$(VERSION)
380 cp win3*.* unix*.c newlisp-$(VERSION)
381 cp Makefile build configure makefile* qa* newlisp-$(VERSION)
382 cp modules/* newlisp-$(VERSION)/modules
383 cp examples/* newlisp-$(VERSION)/examples
384 cp doc/* newlisp-$(VERSION)/doc
385 cp util/* newlisp-$(VERSION)/util
386 cp -R guiserver/* newlisp-$(VERSION)/guiserver
388 tar czvf newlisp-$(VERSION).tgz newlisp-$(VERSION)/*
389 rm -rf newlisp-$(VERSION)
390 mv newlisp-$(VERSION).tgz ..
392 osx_package:
393 make -f makefile_osx_package
395 # this changes to the current version number in several files
397 # before doing a 'make version' the VERSION variable at the beginning
398 # of this file has to be changed to the new number
400 version:
401 sed -i.bak -E 's/int version = .+;/int version = $(INT_VERSION);/' newlisp.c
402 sed -i.bak -E 's/newLISP v.[[:digit:]]+.[[:digit:]]+.[[:digit:]]+ /newLISP v.$(VERSION) /' newlisp.c
403 sed -i.bak -E 's/newLISP v.+ Manual/newLISP v.$(VERSION) Manual/' doc/newlisp_manual.html
404 sed -i.bak -E 's/Reference v.+<\/h2>/Reference v.$(VERSION)<\/h2>/' doc/newlisp_manual.html
405 sed -i.bak -E 's/newlisp-....-win/newlisp-$(INT_VERSION)-win/' guiserver/newlisp-gs.nsi
406 sed -i.bak -E 's/and newLISP .+ on /and newLISP $(VERSION) on /' guiserver/newlisp-gs.nsi
408 # Prepare the manual file for PDF conversion, byt replaceing all <span class="function"></span>
409 # with <font color="#DD0000"></font> in the syntax statements and replacing &rarr; (one line
410 # arrow with &rArr; (double line arrow). This is necessary when using OpenOffcice PDF conversion
412 preparepdf:
413 util/preparepdf doc/newlisp_manual.html doc/newlisp_manual_preparepdf.html
415 # end of file