home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / x / xntp3.zip / gizmo / Makefile < prev    next >
Makefile  |  1992-09-04  |  4KB  |  168 lines

  1. PROGRAM=    gizmontp
  2. #
  3. # makefile for gizmontp - an NTP server for the gizmo board
  4. #
  5. COMPILER= cc
  6. COPTS= -O
  7. BINDIR=    /usr/local
  8. DEFS= -DSTREAM -DREFCLOCK -DNO_SIGNED_CHAR_DECL -DPPS -DPPSDEV -DUSELIBKVM -DDEBUG
  9. #
  10. # This can be compiled with gcc.  If so, change the CC= line and
  11. # make sure -DNO_SIGNED_CHAR_DECL isn't declared in the GIZMODEFS line
  12. #
  13. #
  14. #
  15. CC=    cc
  16. GIZMODEFS= -DGIZMO -DNODETACH -DNOKMEM -DADJTIME_IS_ACCURATE \
  17.        -DREFCLOCK -DNO_SIGNED_CHAR_DECL
  18.  
  19. #
  20. # Clock driver definitions.  One or more of -DLOCAL, -DCHU, -DPST
  21. #
  22. REFFLAGS= $(GIZMODEFS) -DLOCAL -DCHU
  23.  
  24. #
  25. # CCFLAGS are what is needed to compile for a 68000 with no floating point
  26. # LDFLAGS are what is needed to compile the program text starting at 0x20000
  27. # CFFLAGS are used to compile the configuration program (gizconf).  This
  28. #    is compiled on the host computer.
  29. #
  30. CCFLAGS=    -m68010 -fsoft -O
  31. LDFLAGS=    -Ttext 20000
  32.  
  33. #
  34. # Where the gizmo monitor source is to be found
  35. #
  36. GIZMOMON=    ../../gizmo
  37.  
  38. #
  39. NTPLIB=        ../lib/libntp.a
  40. #
  41. STDINCL=    -I../include
  42. GIZINCL=    -I./include -I.
  43. INCL=        $(STDINCL) $(GIZINCL)
  44. CFLAGS=        $(CCFLAGS) $(GIZMODEFS) $(INCL)
  45. LIBFLAGS=    $(CCFLAGS) -DBIG_ENDIAN $(INCL)
  46. LIB=        libgizmontp.a
  47. LINTLIB=    llib-llibgizmontp.ln
  48. CLIB=        $(GIZMOMON)/dmon/libc10.a
  49. MAKE=        make
  50. LIBNTP=        ../lib/libntp.a
  51. #
  52. SOURCE=    ../xntpd/ntp_control.c ../xntpd/ntp_io.c \
  53.     ../xntpd/ntp_leap.c ../xntpd/ntp_loopfilter.c \
  54.     ../xntpd/ntp_monitor.c ../xntpd/ntp_peer.c \
  55.     ../xntpd/ntp_proto.c ../xntpd/ntp_refclock.c \
  56.     ../xntpd/ntp_request.c ../xntpd/ntp_restrict.c \
  57.     ../xntpd/ntp_timer.c ../xntpd/ntp_unixclock.c \
  58.     ../xntpd/ntpd.c ../xntpd/refclock_chu.c \
  59.     ../xntpd/refclock_local.c gizclock_conf.c \
  60.     gizmo_conf_data.c gizmo_config.c gizmo_syslog.c \
  61.     gizmo_util.c gizconf.c
  62.  
  63. OBJS=    gizclock_conf.o gizmo_conf_data.o gizmo_config.o gizmo_syslog.o \
  64.     gizmo_util.o ntp_control.o ntp_io.o ntp_leap.o ntp_loopfilter.o \
  65.     ntp_monitor.o ntp_peer.o ntp_proto.o ntp_refclock.o ntp_request.o \
  66.     ntp_restrict.o ntp_timer.o ntp_unixclock.o ntpd.o refclock_chu.o \
  67.     refclock_local.o
  68.  
  69. COBJS=    gizconf.o
  70.  
  71. all:    $(PROGRAM) gizconf
  72.  
  73. $(PROGRAM): $(LIB) $(OBJS) version.o
  74.     $(CC) $(CCFLAGS) $(LDFLAGS) -o $@ $(OBJS) version.o $(LIB) $(CLIB)
  75.  
  76. gizconf: $(COBJS) $(LIBNTP)
  77.     $(CC) $(COPTS) -o $@ $(COBJS) $(LIBNTP)
  78.  
  79. install:    $(PROGRAM) gizconf
  80.     install -c -m 0755 $(PROGRAM) $(CONFDIR)
  81.     install -c -m 0755 gizconf $(CONFDIR)
  82.  
  83. tags:
  84.     ctags *.c *.h
  85.  
  86. depend:
  87.     mkdep $(CFLAGS) $(SOURCE) $(LIBSRC)
  88.  
  89. clean:
  90.     rm -f $(PROGRAM) gizconf $(LIB) $(LINTLIB) *.o *.out
  91.     rm -f tags make.log Makefile.bak include/* lint.errs
  92.  
  93. links:
  94.     ln -s $(GIZMOMON)/tcpip/h ./include/sys
  95.     ln -s $(GIZMOMON)/tcpip/netinet ./include/netinet
  96.     ln -s $(GIZMOMON)/tcpip/net ./include/net
  97.     ln -s $(GIZMOMON)/tcpip/machine ./include/machine
  98.  
  99. lint:    $(LINTLIB)
  100.     lint $(DEFS) $(INCL) $(LINTLIB) $(SOURCE)
  101.  
  102. $(LIB):
  103.     $(MAKE) -f Makefile.lib $(MFLAGS)
  104.  
  105. $(LINTLIB):
  106.     $(MAKE) -f Makefile.lib $(MFLAGS) $(LINTLIB)
  107.  
  108. #
  109. # Explicit make rule for the configuration program
  110. #
  111. gizconf.o:    gizconf.c
  112.     $(COMPILER) $(COPTS) $(DEFS) $(STDINCL) -c gizconf.c
  113.  
  114. #
  115. # Explicit make rules for everything compiled from the xntpd directory
  116. #
  117.  
  118. ntp_control.o: ../xntpd/ntp_control.c
  119.     $(CC) $(CFLAGS) -c ../xntpd/ntp_control.c
  120.  
  121. ntp_io.o: ../xntpd/ntp_io.c
  122.     $(CC) $(CFLAGS) -c ../xntpd/ntp_io.c
  123.  
  124. ntp_leap.o: ../xntpd/ntp_leap.c
  125.     $(CC) $(CFLAGS) -c ../xntpd/ntp_leap.c
  126.  
  127. ntp_loopfilter.o: ../xntpd/ntp_loopfilter.c
  128.     $(CC) $(CFLAGS) -c ../xntpd/ntp_loopfilter.c
  129.  
  130. ntp_monitor.o:    ../xntpd/ntp_monitor.c
  131.     $(CC) $(CFLAGS) -c ../xntpd/ntp_monitor.c
  132.  
  133. ntp_peer.o:    ../xntpd/ntp_peer.c
  134.     $(CC) $(CFLAGS) -c ../xntpd/ntp_peer.c
  135.  
  136. ntp_proto.o:    ../xntpd/ntp_proto.c
  137.     $(CC) $(CFLAGS) -c ../xntpd/ntp_proto.c
  138.  
  139. ntp_refclock.o:    ../xntpd/ntp_refclock.c
  140.     $(CC) $(CFLAGS) -c ../xntpd/ntp_refclock.c
  141.  
  142. ntp_request.o:    ../xntpd/ntp_request.c
  143.     $(CC) $(CFLAGS) -c ../xntpd/ntp_request.c
  144.  
  145. ntp_restrict.o:    ../xntpd/ntp_restrict.c
  146.     $(CC) $(CFLAGS) -c ../xntpd/ntp_restrict.c
  147.  
  148. ntp_timer.o:    ../xntpd/ntp_timer.c
  149.     $(CC) $(CFLAGS) -c ../xntpd/ntp_timer.c
  150.  
  151. ntp_unixclock.o:    ../xntpd/ntp_unixclock.c
  152.     $(CC) $(CFLAGS) -c ../xntpd/ntp_unixclock.c
  153.  
  154. ntpd.o:    ../xntpd/ntpd.c
  155.     $(CC) $(CFLAGS) -c ../xntpd/ntpd.c
  156.  
  157. #
  158. # These guys require knowledge of our clock configuration
  159. #
  160. gizclock_conf.o:    gizclock_conf.c
  161.     $(CC) $(COPTS) $(REFFLAGS) $(INCL) -c gizclock_conf.c
  162.  
  163. refclock_chu.o:        ../xntpd/refclock_chu.c
  164.     $(CC) $(COPTS) $(REFFLAGS) $(INCL) -c ../xntpd/refclock_chu.c
  165.  
  166. refclock_local.o:    ../xntpd/refclock_local.c
  167.     $(CC) $(COPTS) $(REFFLAGS) $(INCL) -c ../xntpd/refclock_local.c
  168.