home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1997 August / PCO0897.ISO / filesbbs / os2 / plnk065.arj / PLNK065.ZIP / pilot-link.0.6.5 / Makefile.os2 < prev    next >
Encoding:
Makefile  |  1997-06-16  |  8.3 KB  |  245 lines

  1.  
  2. ## If you want to make pilot-debug, and have Tcl >= 7.5, then uncomment the
  3. ## following three lines and correct the library and include paths to match
  4. ## what is needed on your system
  5.  
  6. #PDEXE = pilot-debug$(EXT)
  7. #TCLLIBS  = -L/usr/local/tcl7.5/lib -ltcl7.5 -ldl
  8. #TCLDEFS  = -I/usr/local/tcl7.5/include
  9.  
  10. ## You may uncomment the TK lines below if you have Tk >= 4.1, though Tk is
  11. ## not required, either for compilation or execution.
  12.  
  13. #TKLIBS  = -L/usr/local/tcl7.5/lib -L/usr/X11/lib -ltk4.1 -lX11
  14. #TKDEFS  = -DTK -I/usr/local/tcl7.5/include
  15.  
  16. ## If you have GNU readline 2.0 (all other versions not presently supported)
  17. ## you may compile much better command-line support into pilot-debug by
  18. ## uncommenting these lines, correcting the libraries and paths if needed.
  19.  
  20. #RLLIBS  = -lreadline -ltermcap
  21. #RLDEFS  = -DREADLINE_2_0
  22.  
  23. prefix = @prefix@
  24. exec_prefix = @exec_prefix@
  25. bindir = @bindir@
  26. libdir = @libdir@
  27. pixdir = ${libdir}/pix
  28. includedir = @includedir@
  29. mandir = @mandir@
  30. srcdir = ./
  31. VPATH = ./
  32.  
  33. PURELINK =
  34. PURIFY =
  35.  
  36. CC = gcc
  37. CXX = gcc
  38. CFLAGS = -g -O2 -fno-strength-reduce -Wall -DLIBDIR=\"$(libdir)\" -I./include -I$(srcdir)/include
  39. # -DDEBUG
  40. CXXFLAGS = -g -O2 -fno-strength-reduce -Wall -DLIBDIR=\"$(libdir)\" -I./include -I$(srcdir)/include
  41. LDFLAGS = 
  42. LIBS = -lsocket -los2
  43. # -lefence
  44. CXXLIBS = -lstdcpp
  45.  
  46. libcclib = libcc/libpicc.a
  47. cclib = libpicc.a
  48.  
  49. INSTALL = @INSTALL@
  50. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  51. INSTALL_DATA = @INSTALL_DATA@
  52. YACC = bison -y
  53. RANLIB = ar -s
  54. RM = rm -f
  55. STRIP = strip
  56. SHELL = sh
  57. CPLIB = cp
  58. EXT = .EXE
  59. SUBMAKE_COMM = $(MAKE) -C libsock -f Makefile.os2
  60. SUBMAKE_COMM_CC = $(MAKE) -C libcc -f Makefile.os2
  61.  
  62. .SUFFIXES: .out .o .cc .c .e .r .f .y .l .s .p
  63.  
  64. .cc.o: ; $(CXX) $(CXXFLAGS) -c $*.cc
  65.  
  66. CCEXECS = ccexample$(EXT) iambicexample$(EXT)
  67.  
  68. EXECS = pilot-xfer$(EXT) pilot-file$(EXT) pilot-dedupe$(EXT) $(PDEXE) pilot-schlep$(EXT)\
  69.         install-memo$(EXT) install-user$(EXT)\
  70.         install-todos$(EXT) pilot-addresses$(EXT) pilot-clip$(EXT)\
  71.         read-ical$(EXT) pilot-mail$(EXT) read-expenses$(EXT)\
  72.         sync-memodir$(EXT) sync-ical$(EXT) $(CCEXECS) \
  73.         reminders$(EXT) memos$(EXT) addresses$(EXT) read-todos$(EXT)\
  74.         debugsh$(EXT) dlpsh$(EXT) \
  75.         getrom$(EXT) \
  76.         test-connector$(EXT) test-acceptor$(EXT)
  77.  
  78. PERLEXECS = pilot-undelete
  79.  
  80. PILIBS = libpisock.a
  81. PICCLIBS = $(PILIBS) libpicc.a
  82.  
  83. all: submake $(EXECS)
  84.  
  85. submake libsock/libpisock.a $(libcclib):
  86.     $(SUBMAKE_COMM)
  87.     $(SUBMAKE_COMM_CC)
  88.  
  89. libpisock.a: libsock/libpisock.a
  90.     $(CPLIB) libsock/libpisock.a libpisock.a
  91.  
  92. libpicc.a: libcc/libpicc.a
  93.     $(CPLIB) libcc/libpicc.a libpicc.a
  94.  
  95. installdirs:
  96.     $(SHELL) ${srcdir}/scripts/mkinstalldirs $(bindir) $(includedir) $(libdir) $(pixdir)
  97.  
  98. install: $(EXECS) installdirs libpisock.a
  99.     for p in $(EXECS); do \
  100.         $(INSTALL_PROGRAM) $$p $(bindir)/$$p; \
  101.         $(STRIP) $(bindir)/$$p; \
  102.     done
  103.     for p in $(EXECS) $(PERLEXECS); do \
  104.         $(INSTALL_PROGRAM) $$p $(bindir)/$$p; \
  105.     done
  106.     for h in include/*.h $(srcdir)/include/*.h; do \
  107.         $(INSTALL_DATA) $$h $(includedir)/`basename $$h`; \
  108.     done
  109.     for p in $(srcdir)/pix/*.gif $(srcdir)/pix/*.xbm; do \
  110.         $(INSTALL_DATA) $$p $(pixdir)/`basename $$p`; \
  111.     done
  112.     $(INSTALL_DATA) libpisock.a $(libdir)/libpisock.a
  113.     $(RANLIB) $(libdir)/libpisock.a
  114.     if test -f libpicc.a; then \
  115.         $(INSTALL_DATA) libpicc.a $(libdir)/libpicc.a; \
  116.         $(RANLIB) $(libdir)/libpicc.a; \
  117.     fi
  118.  
  119. uninstall: $(EXECS)
  120.     -for p in $(EXECS) $(PERLEXECS) pilot-debug; do \
  121.         $(RM) $(bindir)/$$p; \
  122.     done
  123.     -rmdir $(bindir)
  124.     -for h in include/*; do \
  125.         $(RM) $(includedir)/`basename $$h`; \
  126.     done
  127.     -rmdir $(includedir)
  128.     -$(RM) $(libdir)/libpisock.a
  129.     -$(RM) $(libdir)/libpicc.a
  130.     -rmdir $(libdir)
  131.  
  132. install-memo$(EXT): $(PILIBS) install-memo.o
  133.     $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS) install-memo.o $(PILIBS) -o $@ $(LIBS)
  134.  
  135. install-todos$(EXT): $(PILIBS) install-todos.o
  136.     $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS) install-todos.o $(PILIBS) -o $@ $(LIBS)
  137.  
  138. pilot-addresses$(EXT): $(PILIBS) pilot-addresses.o
  139.     $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS) pilot-addresses.o $(PILIBS) -o $@ $(LIBS)
  140.  
  141. pilot-dedupe$(EXT): $(PILIBS) pilot-dedupe.o
  142.     $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS) pilot-dedupe.o $(PILIBS) -o $@ $(LIBS)
  143.  
  144. install-user$(EXT): $(PILIBS) install-user.o
  145.     $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS) install-user.o $(PILIBS) -o $@ $(LIBS)
  146.  
  147. pilot-xfer$(EXT): $(PILIBS) pilot-xfer.o
  148.     $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS) pilot-xfer.o $(PILIBS) -o $@ $(LIBS)
  149.  
  150. pilot-schlep$(EXT): $(PILIBS) pilot-schlep.o
  151.     $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS) pilot-schlep.o $(PILIBS) -o $@ $(LIBS)
  152.  
  153. pilot-mail$(EXT): $(PILIBS) pilot-mail.o parsedate.o
  154.     $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS) pilot-mail.o parsedate.o $(PILIBS) -o $@ $(LIBS)
  155.  
  156. pilot-file$(EXT): $(PILIBS) pilot-file.o
  157.     $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS) pilot-file.o $(PILIBS) -o $@ $(LIBS)
  158.  
  159. pilot-clip$(EXT): $(PILIBS) pilot-clip.o
  160.     $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS) pilot-clip.o $(PILIBS) -o $@ $(LIBS)
  161.  
  162. pilot-debug.o: $(PILIBS) pilot-debug.c Makefile
  163.     $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS) $(TCLDEFS) $(TKDEFS) -c pilot-debug.c
  164.  
  165. pd-tty.o: $(PILIBS) pd-tty.c Makefile
  166.     $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS) $(TCLDEFS) $(TKDEFS) $(RLDEFS) -c pd-tty.c
  167.  
  168. pilot-debug$(EXT): $(PILIBS) pilot-debug.o pd-tty.o
  169.     $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS) pilot-debug.o pd-tty.o $(PILIBS) -o $@ $(TKLIBS) $(TCLLIBS) $(RLLIBS) $(LIBS)
  170.  
  171. reminders$(EXT): $(PILIBS) reminders.o
  172.     $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS) reminders.o $(PILIBS) -o $@ $(LIBS)
  173.  
  174. memos$(EXT): $(PILIBS) memos.o
  175.     $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS) memos.o $(PILIBS) -o $@ $(LIBS)
  176.  
  177. read-todos$(EXT): $(PILIBS) read-todos.o
  178.     $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS) read-todos.o $(PILIBS) -o $@ $(LIBS)
  179.  
  180. read-expenses$(EXT): $(PILIBS) read-expenses.o
  181.     $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS) read-expenses.o $(PILIBS) -o $@ $(LIBS)
  182.  
  183. read-ical$(EXT): $(PILIBS) read-ical.o
  184.     $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS) read-ical.o $(PILIBS) -o $@ $(LIBS)
  185.  
  186. sync-memodir$(EXT): $(PILIBS) sync-memodir.o
  187.     $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS) sync-memodir.o $(PILIBS) -o $@ $(LIBS)
  188.  
  189. sync-ical$(EXT): $(PILIBS) sync-ical.o
  190.     $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS) sync-ical.o $(PILIBS) -o $@ $(LIBS)
  191.  
  192. addresses$(EXT): $(PILIBS) addresses.o
  193.     $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS) addresses.o $(PILIBS) -o $@ $(LIBS)
  194.  
  195. test-connector$(EXT): $(PILIBS) test-connector.o
  196.     $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS) test-connector.o $(PILIBS) -o $@ $(LIBS)
  197.  
  198. test-acceptor$(EXT): $(PILIBS) test-acceptor.o
  199.     $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS) test-acceptor.o $(PILIBS) -o $@ $(LIBS)
  200.  
  201. dlpsh$(EXT): $(PILIBS) dlpsh.o
  202.     $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS) dlpsh.o $(PILIBS) -o $@ $(LIBS)
  203.  
  204. debugsh$(EXT): $(PILIBS) debugsh.o
  205.     $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS) debugsh.o $(PILIBS) -o $@ $(LIBS)
  206.  
  207. ccexample$(EXT): $(PICCLIBS) ccexample.o
  208.     $(PURELINK) $(PURIFY) $(CXX) $(LDFLAGS) $(CXXFLAGS) ccexample.o $(PICCLIBS) -o $@ $(CXXLIBS) $(LIBS)
  209.  
  210. validate$(EXT): $(PICCLIBS) validate.o
  211.     $(PURELINK) $(PURIFY) $(CXX) $(LDFLAGS) $(CXXFLAGS) validate.o $(PICCLIBS) -o $@ $(CXXLIBS) $(LIBS)
  212.  
  213. iambicexample$(EXT): $(PICCLIBS) iambicexample.o
  214.     $(PURELINK) $(PURIFY) $(CXX) $(LDFLAGS) $(CXXFLAGS) iambicexample.o $(PICCLIBS) -o $@ $(CXXLIBS) $(LIBS)
  215.  
  216. getrom$(EXT): $(PILIBS) getrom.o
  217.     $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS) getrom.o $(PILIBS) -o $@ $(LIBS)
  218.  
  219. parsedate.c: parsedate.y
  220.     @echo Expect six shift/reduce conflicts
  221.     $(YACC) parsedate.y
  222.     mv y.tab.c parsedate.c
  223.  
  224. strip: $(EXECS)
  225.     $(STRIP) $(EXECS)
  226.  
  227. distclean: clean
  228.     @-p4 edit Makefile.os2 */Makefile.os2 */Makefile.in 2>&1 >> /dev/null
  229.     $(SUBMAKE_COMM) depend
  230.     $(SUBMAKE_COMM_CC) depend
  231.     $(RM) Makefile libsock/Makefile libsock/Makefile.in~ include/pi-config.h
  232.     $(RM) libcc/Makefile libcc/Makefile.in~
  233.     $(RM) config.log config.status config.cache
  234.     $(RM) PiDebug.log 
  235.     $(RM) *~ *.orig */*~ */*.orig
  236.     perl scripts/os2dist.pl
  237.     @-p4 revert `p4 diff -sr Makefile.os2 */Makefile.os2 */Makefile.in` 2>&1 >> /dev/null 
  238.  
  239. clean:
  240.     $(RM) *.o *.a core a.out test_s test_c install-prc$(EXT) pilot-debug$(EXT)
  241.     $(RM) $(EXECS) validate
  242.     $(RM) pilot.rom
  243.     $(SUBMAKE_COMM) clean
  244.     $(SUBMAKE_COMM_CC) clean
  245.