Makefile
上传用户:zlh9724
上传日期:2007-01-04
资源大小:1991k
文件大小:13k
源码类别:

浏览器

开发平台:

Unix_Linux

  1. # Make WWW product
  2. # include ../../All/$(WWW_MACH)/Makefile.include
  3. #include Makefile.include
  4. #  Make WWW under unix for netbsd
  5. #
  6. # For W3 distribution, machine type for subdirectories
  7. WWW_MACH = netbsd
  8. # The ASIS repository's name for the machine we are on
  9. ASIS_MACH = netbsd/amiga
  10. # Options for cc 
  11. #CC = cc
  12. #CFLAGS = -DDEBUG
  13. #LFLAGS = -Bstatic
  14. # Options for gcc
  15. CC = gcc
  16. CFLAGS = -O -g -DNO_STRERROR
  17. #CFLAGS = -Wall -g -DNO_GETWD -DHAS_GETCWD 
  18. # CFLAGS = -Wall -g
  19. #LFLAGS = -static
  20. # In both cases: Ask for static linking so that binary will be transportable
  21. # Directory for installed binary:
  22. BINDIR = /usr/local/bin
  23. #BINDIR = ../../LineMode/sun4
  24. #_________________ OK if normal W3 distribution
  25. # Where is the WWW source root?
  26. WWW = ../..
  27. #  Where should temporary (object) files go?
  28. # WTMP = /usr/tmp
  29. WTMP = $(WWW)
  30. # Where is the W3 object library?
  31. #LIBDIR = $(WWW)/Library/Implementation/$(WWW_MACH)
  32. USELIBDIR = ../../Library/$(WWW_MACH)
  33. XLIBDIR = /usr/X11R5/lib
  34. OTHERLIB = -lm
  35. #include ../Implementation/CommonMakefile
  36. # Makefile for WorldWideWeb    Arena browser (www)
  37. #
  38. # (c) CERN 1990, 1991 -- see Copyright.html for conditions
  39. #
  40. # This file should be invariant between systems.
  41. # DEPENDENCIES NOT COMPLETE @@
  42. #
  43. # make Compile and link the software (private version)
  44. # make install Copy it into the system (implies make)
  45. # make update Copy installed version into installed version
  46. # make uninstall Unlink installed version from the system
  47. # make clean Remove intermediate files
  48. # make cleanall Remove intremediate files and products
  49. #
  50. # Macros required to be defined already for make:
  51. #
  52. # CC The C compiler
  53. # CFLAGS Flags for $(CC)
  54. # LFLAGS Flags for ld
  55. # WWW Root of WWW source tree
  56. #
  57. # Macros needed for make install:
  58. #
  59. # BINDIR Directory for installed binary
  60. #______________________________________________________________________
  61. #  If this env var is set to something else Some makes will use that instead
  62. SHELL = /bin/sh
  63. # If this is actually run in a subdirectory.
  64. #
  65. # WWW = ../../..
  66. # If it is run in this directory:
  67. #
  68. # WWW = ../.. For [cernlib] build in this directory
  69. ARENA =  $(WWW)/Arena/Implementation/
  70. LMD = $(WWW)/Arena/Defaults
  71. CMN = $(WWW)/Library/Implementation/
  72. DEFAULTS = $(WWW)/Arena/Defaults
  73. CFLAGS2 = $(CFLAGS) -I$(CMN) -I$(ARENA)
  74. CERNLIBBIN = $(WWW)/bin
  75. # WTMP is either WWW or /tmp for example. It allows the 
  76. # machine-dependent files to be put in a separate tree so that
  77. # - The source tree can be read-only
  78. # - The source tree can be shared across platforms
  79. #
  80. USELIBDIR = $(WTMP)/Library/$(WWW_MACH)
  81. # XLIBDIR = /usr/lib/X11
  82. JPEGDIR = ../../Image/jpeg
  83. PNGDIR = ../../Image/libpng
  84. ZLIBDIR = ../../Image/zlib
  85. OBJ = $(WTMP)/Arena/$(WWW_MACH)
  86. BIN = $(WWW)/Arena/$(WWW_MACH)
  87. OE = $(OBJ)/.created
  88. WWWLIB = -L$(USELIBDIR) -lwww
  89. XLIB = -L$(XLIBDIR) -lX11
  90. JPEGLIB = $(JPEGDIR)/$(WWW_MACH)/libjpeg.a
  91. PNGLIB = $(PNGDIR)/$(WWW_MACH)/libpng.a
  92. ZLIB = $(ZLIBDIR)/$(WWW_MACH)/libz.a
  93. OBJS = $(OBJ)/www.o $(OBJ)/display.o 
  94.   $(OBJ)/scrollbar.o $(OBJ)/toolbar.o $(OBJ)/entities.o $(OBJ)/forms.o 
  95.   $(OBJ)/status.o $(OBJ)/html.o $(OBJ)/parsehtml.o 
  96.   $(OBJ)/image.o $(OBJ)/gif.o $(OBJ)/bridge.o 
  97.   $(OBJ)/mailcap.o $(OBJ)/XGetHClrs.o $(OBJ)/util.o 
  98.   $(OBJ)/math.o $(OBJ)/editor.o $(OBJ)/icon.o $(OBJ)/history.o 
  99.   $(OBJ)/jpeg.o $(OBJ)/dither.o $(OBJ)/style.o $(OBJ)/x11.o $(OBJ)/png.o 
  100.   $(OBJ)/menu.o $(OBJ)/tools.o $(OBJ)/neweditor.o $(OBJ)/popup.o 
  101.   $(OBJ)/parsecommand.o
  102. # Final main product
  103. PROD = arena 
  104. SOURCES = $(ARENA)www.c $(ARENA)display.c 
  105.   $(ARENA)scrollbar.c $(ARENA)toolbar.c $(ARENA)entities.c forms.c 
  106.   $(ARENA)status.c $(ARENA)html.c $(ARENA)parsehtml.c 
  107.   $(ARENA)image.c $(ARENA)gif.c bridge.c 
  108.   $(ARENA)mailcap.c $(ARENA)XGetHClrs.c util.c 
  109.   $(ARENA)math.c $(ARENA)editor.c $(ARENA)icon.c $(ARENA)history.c 
  110.   $(ARENA)jpeg.c $(ARENA)dither.c $(ARENA)style.c $(ARENA)x11.c 
  111.   $(ARENA)png.o $(ARENA)menu.o $(ARENA)tools.o $(ARENA)neweditor.c 
  112.   $(ARENA)popup.c $(ARENA)parsecommand.c
  113. INCLUDES = $(ARENA)www.h $(ARENA)bridge.h $(ARENA)neweditor.h
  114. SPECIFIC =  
  115. $(ARENA)apollo_m68k/Makefile 
  116. $(ARENA)decstation/Makefile 
  117. $(ARENA)next/Makefile 
  118. $(ARENA)pc-nfs/makefile 
  119. $(ARENA)pc-nfs/README 
  120. $(ARENA)pc-nfs/topc 
  121. $(ARENA)rs6000/Makefile 
  122. $(ARENA)sgi/Makefile 
  123. $(ARENA)snake/Makefile 
  124. $(ARENA)sun3/Makefile 
  125. $(ARENA)sun4/Makefile 
  126. $(ARENA)sun4-sol2/Makefile 
  127. $(ARENA)unix/Makefile 
  128. $(ARENA)vax_ultrix/Makefile 
  129. $(ARENA)vax_ultrix_cc/Makefile 
  130. $(ARENA)vms/descrip.mms 
  131. $(ARENA)vms/setup.com
  132. # Bug: This path, if relative, is taken relative to the directory
  133. # in which this makefile is, not the pwd.  This screws up the 
  134. # recursive invocation
  135. all: $(BIN)/$(PROD) 
  136. #$(BIN)/jpeg
  137. #arena: $(OBJS) $(USELIBDIR)/libwww.a
  138. $(BIN)/$(PROD) : $(OBJS) $(USELIBDIR)/libwww.a
  139. $(CC) -o $@ $(OBJS) $(LFLAGS) $(JPEGLIB) $(PNGLIB) $(ZLIB) $(XLIB) $(WWWLIB) $(OTHERLIB) 
  140. $(USELIBDIR)/libwww.a :
  141. @echo You must get and make the WWWLibrary product first! $(USELIBDIR)
  142. (cd $(WWW)/Library/$(WWW_MACH) && $(MAKE))
  143. lib :
  144. (cd $(WWW)/Library/$(WWW_MACH) && $(MAKE))
  145. # Make a copy of the binary and documentation on this machine
  146. install : $(PROD)
  147. cp $(PROD) $(BINDIR)/$(PROD)
  148. - mkdir /usr/local
  149. - mkdir /usr/local/lib
  150. - mkdir /usr/local/lib/WWW
  151. cp $(DEFAULTS)/*.html /usr/local/lib/WWW
  152. # Link system to the binary and documentation in this tree
  153. link : Works/$(PROD)
  154. ln -s `pwd`/$(PROD) $(BINDIR)/$(PROD)
  155. - mkdir /usr/local
  156. - mkdir /usr/local/lib
  157. ln -s $(DEFAULTS) /usr/local/lib/WWW
  158. uninstall :
  159. rm $(BINDIR)/$(PROD)
  160. rm -r /usr/local/lib/WWW
  161. # Clean up everything generatable except final products
  162. # Including obj directory UNLESS there is anything else in it
  163. clean :
  164. rm $(OBJ)/.created $(OBJ)/*.o
  165. -rmdir $(OBJ)
  166. # Clean up everything generatable including final products
  167. cleanall : clean
  168. rm $(PROD)
  169. # Binary release
  170. #
  171. # Must be done on anonymous FTP server!
  172. #
  173. #  This makefile does not knw how to make $(PROD)_$(VL) so that trying
  174. #  to make binay or asis on a weird machine doesn't try to build $(PROD)!
  175. binary : $(PROD)_$(VL)
  176. -mkdir /mnt/www0/pub/www/bin/$(WWW_MACH)
  177. cp $(PROD)_$(VL) /mnt/www0/pub/www/bin/$(WWW_MACH)/$(PROD)_$(VL)
  178. # ASIS installation
  179. # -----------------
  180. # Can only happen on an allocated ASIS development machine and
  181. # with uid of the controlling user for the project.
  182. #
  183. asis : /asis/share/usr.local/lib/WWW/default.html 
  184. /asis/specific/$(ASIS_MACH)/usr.local/bin/$(PROD)
  185. touch asis
  186. echo ASIS distribution is now up-to-date.
  187. /asis/specific/$(ASIS_MACH)/usr.local/bin/$(PROD) : $(PROD)_$(VL)
  188. cp $(PROD)_$(VL) /asis/specific/$(ASIS_MACH)/usr.local/bin/$(PROD)_$(VL)
  189. rm -f /asis/specific/$(ASIS_MACH)/usr.local/bin/$(PROD)
  190. ln -s $(PROD)_$(VL) 
  191. /asis/specific/$(ASIS_MACH)/usr.local/bin/$(PROD)
  192. /asis/share/usr.local/lib/WWW/default.html : $(DEFAULTS)/cern.html
  193. - mkdir /asis/share/usr.local/lib/WWW
  194. cp $(DEFAULTS)/*.html /asis/share/usr.local/lib/WWW
  195. cp $(DEFAULTS)/cern.html /asis/share/usr.local/lib/WWW/default.html
  196. cp $(DEFAULTS)/default.html /asis/share/usr.local/lib/WWW/top.html
  197. # CERNLIB installation
  198. # --------------------
  199. # Assuming the cernlib-style directory structure
  200. # Warning: Not suitable for machine-shared file structure.
  201. #
  202. cernlib : $(PROD)
  203. - mkdir $(CERNLIBBIN)
  204. cp $(PROD) $(CERNLIBBIN)
  205. #_________________________________________________________________________
  206. # Compiling the Objects (Dependenies incomplete)
  207. # Check directory exists
  208. $(OE) :
  209. -mkdir $(WTMP)
  210. -mkdir $(WTMP)/Arena
  211. -mkdir $(WTMP)/Arena/$(WWW_MACH)
  212. touch $(OE)
  213. #
  214. $(OBJ)/www.o : $(OE) $(ARENA)www.c
  215. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)www.c
  216. $(OBJ)/file.o : $(OE) $(ARENA)file.c
  217. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)file.c
  218. $(OBJ)/display.o : $(OE) $(ARENA)display.c
  219. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)display.c
  220. $(OBJ)/scrollbar.o : $(OE) $(ARENA)scrollbar.c
  221. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)scrollbar.c
  222. $(OBJ)/toolbar.o : $(OE) $(ARENA)toolbar.c
  223. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)toolbar.c
  224. $(OBJ)/entities.o : $(OE) $(ARENA)entities.c
  225. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)entities.c
  226. $(OBJ)/forms.o : $(OE) $(ARENA)forms.c
  227. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)forms.c
  228. $(OBJ)/status.o : $(OE) $(ARENA)status.c
  229. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)status.c
  230. $(OBJ)/html.o : $(OE) $(ARENA)html.c
  231. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)html.c
  232. $(OBJ)/parsehtml.o : $(OE) $(ARENA)parsehtml.c
  233. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)parsehtml.c
  234. $(OBJ)/http.o : $(OE) $(ARENA)http.c
  235. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)http.c
  236. $(OBJ)/cache.o : $(OE) $(ARENA)cache.c
  237. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)cache.c
  238. $(OBJ)/image.o : $(OE) $(ARENA)image.c
  239. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)image.c
  240. $(OBJ)/gif.o : $(OE) $(ARENA)gif.c
  241. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)gif.c
  242. $(OBJ)/bridge.o : $(OE) $(ARENA)bridge.c
  243. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)bridge.c
  244. $(OBJ)/strptime.o : $(OE) $(ARENA)strptime.c
  245. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)strptime.c
  246. $(OBJ)/mailcap.o : $(OE) $(ARENA)mailcap.c
  247. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)mailcap.c
  248. $(OBJ)/XGetHClrs.o : $(OE) $(ARENA)XGetHClrs.c
  249. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)XGetHClrs.c
  250. $(OBJ)/util.o : $(OE) $(ARENA)util.c
  251. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)util.c
  252. $(OBJ)/math.o : $(OE) $(ARENA)math.c
  253. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)math.c
  254. $(OBJ)/editor.o : $(OE) $(ARENA)editor.c
  255. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)editor.c
  256. $(OBJ)/icon.o : $(OE) $(ARENA)icon.c 
  257. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)icon.c 
  258. $(OBJ)/history.o : $(OE) $(ARENA)history.c 
  259. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)history.c 
  260. $(OBJ)/dither.o : $(OE) $(ARENA)dither.c 
  261. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)dither.c 
  262. $(OBJ)/jpeg.o : $(OE) $(ARENA)jpeg.c 
  263. $(CC) -c -o $@ $(CFLAGS2) -I$(JPEGDIR)/Implementation $(ARENA)jpeg.c 
  264. $(OBJ)/style.o : $(OE) $(ARENA)style.c 
  265. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)style.c 
  266. $(OBJ)/neweditor.o : $(OE) $(ARENA)neweditor.c
  267. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)neweditor.c
  268. $(OBJ)/popup.o : $(OE) $(ARENA)popup.c
  269. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)popup.c
  270. $(OBJ)/parsecommand.o : $(OE) $(ARENA)parsecommand.c
  271. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)parsecommand.c
  272. # $(OBJ)/skyblue.o : $(OE) $(ARENA)skyblue.c $(ARENA)skyblue.h
  273. #  $(CC) -c -o $@ $(CFLAGS2) $(ARENA)skyblue.c 
  274. # $(OBJ)/constraints.o : $(OE) $(ARENA)constraints.c $(ARENA)skyblue.h
  275. #  $(CC) -c -o $@ $(CFLAGS2) $(ARENA)constraints.c 
  276. $(OBJ)/x11.o : $(OE) $(ARENA)x11.c
  277. $(CC) -c -o $@ $(CFLAGS2) $(ARENA)x11.c 
  278. $(OBJ)/png.o : $(OE) $(ARENA)png.c
  279. $(CC) -c -o $@ $(CFLAGS2) -I$(PNGDIR)/Implementation -I$(ZLIBDIR)/Implementation $(ARENA)png.c 
  280. $(OBJ)/menu.o : $(OE) $(ARENA)menu.c
  281. $(CC) -c -o $@ $(CFLAGS2) -I$(PNGDIR)/Implementation -I$(ZLIBDIR)/Implementation $(ARENA)menu.c 
  282. $(OBJ)/tools.o : $(OE) $(ARENA)tools.c
  283. $(CC) -c -o $@ $(CFLAGS2) -I$(PNGDIR)/Implementation -I$(ZLIBDIR)/Implementation $(ARENA)tools.c 
  284. # W3 Source + documentation release
  285. # ---------------------------------
  286. distribute :  /mnt/www0/pub/www/README.txt /mnt/www0/pub/www/Copyright.txt
  287. (cd $(WWW)/.. && WWW=WWW ABS=`pwd`/ $(MAKE) $(MFLAGS) 
  288. -f WWW/Arena/Implementation/CommonMakefile 
  289. /mnt/www0/pub/www/src/WWWArena_$(VL).tar.Z)
  290. (cd ../Implementation; cvs tag 
  291.     `sed -e 's/V. = /v/' Version.make | sed -e 's?.?/?'` )
  292. echo Distribution of Line Mode version $(VC) up to date.
  293. # THIS MUST BE BUILT FROM THE DIRECTORY ABOVE WWW ! USE distribute above!
  294. /mnt/www0/pub/www/src/WWWArena_$(VL).tar.Z : $(SOURCES) $(LMD)/line-mode-guide.txt
  295. tar cf /mnt/www0/pub/www/src/WWWArena_$(VL).tar 
  296.     $(SOURCES)  $(LMD)/line-mode-guide.txt 
  297.     $(WWW)/Arena/*/Makefile 
  298.     $(WWW)/Arena/vms/descrip.mms $(WWW)/Arena/vms/build_multinet.com 
  299.             $(WWW)/Arena/vms/setup.com      
  300. compress /mnt/www0/pub/www/src/WWWArena_$(VL).tar
  301. # Hypertext supplied in text format
  302. # ---------------------------------
  303. $(WWW)/README.txt : $(WWW)/../README.html
  304. www -n -p66 http://info.cern.ch/hypertext/README.html 
  305. > $(WWW)/README.txt
  306. /mnt/www0/pub/www/README.txt : $(WWW)/README.txt
  307. cp $(WWW)/README.txt /mnt/www0/pub/www/README.txt
  308. $(WWW)/Copyright.txt : $(WWW)/../Copyright.html
  309. www -n -p66 http://info.cern.ch/hypertext/Copyright.html 
  310. > $(WWW)/Copyright.txt
  311. /mnt/www0/pub/www/Copyright.txt : $(WWW)/Copyright.txt
  312. cp $? $@
  313. # Line Mode Manual
  314. #
  315. QUICKGUIDE = 
  316. $(LMD)/QuickGuide.html 
  317. $(LMD)/Commands.html 
  318.     $(LMD)/SourceExamples.html 
  319. $(LMD)/CommandLine.html 
  320. $(LMD)/Shortcuts.html 
  321.     $(LMD)/VMS_Shortcuts.html 
  322. $(LMD)/Installation.html 
  323.     $(LMD)/Installation_VMS.html 
  324.     $(LMD)/Installation_VMS_NewTCP.html 
  325.     $(LMD)/Distribution.html 
  326.     $(LMD)/Porting.html 
  327.     $(LMD)/MachineTypes.html 
  328.     $(LMD)/InstallNotSU.html 
  329.     $(LMD)/Path.html 
  330.     $(LMD)/LoginScript.html 
  331. $(LMD)/Customisation.html 
  332.     $(LMD)/EnvVariables.html 
  333.     $(LMD)/GlobalV.html 
  334.     $(LMD)/NewsServer.html 
  335. $(LMD)/Bugs.html 
  336. $(LMD)/Features.html
  337. doc : /mnt/www0/pub/www/doc/line-mode-guide.txt
  338. echo line mode browser guide exists.
  339. /mnt/www0/pub/www/doc/line-mode-guide.txt : $(LMD)/line-mode-guide.txt
  340. cp $? $@
  341. $(LMD)/line-mode-guide.txt : $(QUICKGUIDE)
  342. -rm $@
  343. for i in $(QUICKGUIDE) ; do www -n -na -p66 $$i >> $@; done