home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 4 / FreshFish_May-June1994.bin / bbs / may94 / util / edit / jade.lha / Jade / src / Makefile < prev    next >
Makefile  |  1994-04-20  |  4KB  |  114 lines

  1. # Makefile for Jade version 3
  2. # Copyright (C) 1993, 1994 John Harper <jsh@ukc.ac.uk>
  3.  
  4. # Jade is free software; you can redistribute it and/or modify it
  5. # under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8.  
  9. # Jade is distributed in the hope that it will be useful, but
  10. # WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.    See the
  12. # GNU General Public License for more details.
  13.  
  14. # You should have received a copy of the GNU General Public License
  15. # along with Jade; see the file COPYING.  If not, write to
  16. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. COMMON_SRCS = buffers.c commandline.c edit.c editcommands.c find.c \
  19.           housekeeping.c io.c keys.c lisp.c lispcmds.c lispmach.c main.c \
  20.           misc.c movement.c prefs.c refresh.c render.c streams.c \
  21.           stringmem.c symbols.c values.c windows.c
  22. COMMON_HDRS = jade.h edit.h lisp.h value.h keys.h config.h stringmem.h \
  23.           doc-strings.h
  24. COMMON_OBJS = $(COMMON_SRCS:.c=.o)
  25.  
  26. X11_SRCS    = x11_commandline.c x11_display.c x11_eventloop.c x11_keys.c \
  27.           x11_misc.c x11_render.c x11_windows.c
  28. X11_HDRS    = x11_defs.h x11_windowsys.h
  29. X11_OBJS    = $(X11_SRCS:.c=.o)
  30.  
  31. UNIX_SRCS   = lists.c unix_misc.c unix_processes.c unix_memory.c
  32. UNIX_HDRS   = unix_defs.h
  33. UNIX_OBJS   = $(UNIX_SRCS:.c=.o)
  34.  
  35. AMIGA_SRCS  = amiga_clipboard.c amiga_commandline.c amiga_display.c \
  36.           amiga_eventloop.c amiga_keys.c amiga_memory.c amiga_menus.c \
  37.           amiga_minrexx.c amiga_misc.c amiga_render.c amiga_stksize.c \
  38.           amiga_windows.c
  39. AMIGA_HDRS  = amiga_defs.h amiga_windowsys.h
  40. AMIGA_OBJS  = $(AMIGA_SRCS:.c=.o)
  41.  
  42. RE_LIB = regexp/libregexp.a
  43.  
  44. SRCS = $(COMMON_SRCS)
  45. HDRS = $(COMMON_HDRS)
  46. OBJS = $(COMMON_OBJS)
  47. LIBS = $(RE_LIB)
  48. #CFLAGS = -g -DDEBUG
  49. #CFLAGS = -DDEBUG
  50. CFLAGS = -g
  51. LDFLAGS = -s
  52.  
  53. all : jade
  54.  
  55. # This is a link to a file handling all machine/system-dependant stuff
  56. include config.mk
  57.  
  58. jade : jade_protos.h $(OBJS) $(RE_LIB)
  59.     $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
  60.  
  61. jade_protos.h : stripproto $(SRCS)
  62.     ./stripproto -o $@ $(SRCS)
  63.  
  64. # I guess that properly this should depend on $(SRCS) but that would mean
  65. # that whenever *any* source file is modified everything has to be re-built!
  66. # This way when a doc-string is changed in a source file you should do
  67. # something like `make docfile jade'
  68. doc-strings.h doc : makedoc
  69.     ./makedoc DOC.bare doc-strings.h $(COMMON_SRCS) $(X11_SRCS) $(UNIX_SRCS) $(AMIGA_SRCS)
  70.     cp DOC.bare ../DOC-strings
  71.  
  72. stripproto : stripproto.o
  73.     $(CC) $(LDFLAGS) -o $@ stripproto.o
  74.  
  75. makedoc : makedoc.o
  76.     $(CC) $(LDFLAGS) -o $@ makedoc.o
  77.  
  78. # Doesn't check if libregexp.a is up to date -- just that it exists
  79. $(RE_LIB) :
  80.     (cd regexp && $(MAKE))
  81.  
  82. nobak :
  83.     -rm -f *~
  84.  
  85. clean : nobak
  86.     -rm -f *.o jade_protos.h doc-strings.h core
  87.  
  88. realclean : clean
  89.     -rm -f jade DOC.bare makedoc stripproto
  90.     -rm -f config.*
  91.     -(cd regexp && $(MAKE) clean)
  92.  
  93. buffers.o       : $(HDRS)
  94. commandline.o       : $(HDRS)
  95. edit.o           : $(HDRS)
  96. editcommands.o       : $(HDRS)
  97. find.o           : $(HDRS)
  98. housekeeping.o       : $(HDRS)
  99. io.o           : $(HDRS)
  100. keys.o           : $(HDRS)
  101. lisp.o           : $(HDRS)
  102. lispcmds.o       : $(HDRS)
  103. main.o           : $(HDRS) revision.h
  104. misc.o           : $(HDRS) revision.h
  105. movement.o       : $(HDRS)
  106. prefs.o        : $(HDRS)
  107. render.o       : $(HDRS)
  108. streams.o       : $(HDRS)
  109. stringmem.o       : $(HDRS)
  110. symbols.o       : $(HDRS)
  111. values.o       : $(HDRS)
  112. windows.o       : $(HDRS)
  113. revision.o       : $(HDRS)
  114.