home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / alt / sources / 2608 / Makefile < prev    next >
Encoding:
Makefile  |  1992-11-23  |  3.8 KB  |  129 lines

  1. #    @(#)Makefile 1.2 92/05/28 SMI
  2. #    from Makefile 1.5 90/07/23 SMI
  3. #    make xv        build xview/xgl version
  4. #    make sv        build sunview/xgl version (requires special library)
  5. #    make gp        build sunview/gpsi version
  6.  
  7.  
  8. XGLINC = -I$(XGLHOME)/include
  9.  
  10.  
  11. FX-sun4 =    -fsingle /usr/lib/libm.il
  12. FX-sun3 =    -fsingle -f68881 /usr/lib/f68881/libm.il
  13. FX =        -fsingle -f68881 /usr/lib/f68881.il
  14. FP = $(FX$(TARGET_ARCH))
  15.  
  16. CFLAGS = -O $(FP) $(INC)
  17. #CFLAGS = -g -DDEBUG $(FP) $(INC)
  18. #CFLAGS = -O -pg $(FP) $(INC)
  19.  
  20. dstar:= CFLAGS += -DXGL -DXV $(XGLINC)
  21. dstar_xglsv:= CFLAGS += -DXGL $(XGLSVINC)
  22.  
  23.  
  24. #LIBXGLSW = -lxglSW
  25. LIBXGLSW = -L$(XGLHOME)/lib -lxglSW
  26.  
  27. #LIBXGL = -lxgl
  28. LIBXGL = -L$(XGLHOME)/lib -lxgl 
  29.  
  30. .KEEP_STATE:
  31.  
  32.  
  33. SRC = dstar.c control.c draw_hsi_xgl.c draw_starfield_xgl.c netio.c \
  34.     draw_image_xgl.c draw_bsp_xgl.c draw_objects_xgl.c \
  35.     laser.c blast.c special_xv.c control_ship.c \
  36.     create_planet.c create_monolith.c autopilot.c missile.c \
  37.     radar.c panel.c master.c fighter.c static.c \
  38.     create_eship.c missile_control.c
  39.  
  40. OBJ = $(SRC:.c=.o)
  41.  
  42. XGL_SV_SRC = dstar.c control.c draw_hsi_xgl.c draw_starfield_xgl.c netio.c \
  43.     draw_image_xgl.c draw_bsp_xgl.c draw_objects_xgl.c \
  44.     laser.c blast.c special.c control_ship.c \
  45.     create_planet.c create_monolith.c autopilot.c missile.c \
  46.     radar.c panel.c master.c fighter.c static.c \
  47.     create_eship.c missile_control.c
  48.  
  49. XGL_SV_OBJ = $(XGL_SV_SRC:.c=.o)
  50.  
  51. GP_SRCS = dstar.c control.c draw_hsi.c draw_starfield.c netio.c \
  52.     draw_image.c draw_bsp.c draw_objects.c \
  53.     laser.c blast.c special.c control_ship.c \
  54.     create_planet.c create_monolith.c autopilot.c missile.c \
  55.     radar.c panel.c master.c fighter.c static.c \
  56.     create_eship.c missile_control.c
  57.  
  58. GP_OBJS = $(GP_SRCS:.c=.o)
  59.  
  60.  
  61. INCS = blast_line0.h blast_line1.h bsp_object.h dstar.h fighter1_bsp.h \
  62.     fighter1_line.h fighter2_bsp.h fighter2_line.h graphics.h \
  63.     hsi.h line_object.h missile_line.h monolith_bsp.h netio.h \
  64.     object_types.h parameters.h planet1.h planet2.h starfield.h \
  65.     cursor1.pr cursor2.pr dstar.icon dstar_sleep.icon nodstar.icon
  66.  
  67. ROBOT_SRCS = dstar.c control.c netio.c laser.c autopilot.c robot_special.c \
  68.     control_robot.c radar.c fighter.c static.c missile.c master.c
  69.  
  70. ROBOT_OBJS = $(ROBOT_SRCS:.c=.o)
  71.  
  72.  
  73. ROBOT_ARCH = robot_special.c control_robot.c
  74.  
  75. FULL_ARCH = dstar.c control.c draw_hsi.c draw_starfield.c netio.c \
  76.     draw_image.c draw_bsp.c draw_objects.c \
  77.     laser.c blast.c special.c control_ship.c \
  78.     create_planet.c create_monolith.c autopilot.c missile.c \
  79.     radar.c panel.c master.c fighter.c static.c \
  80.     create_eship.c missile_control.c \
  81.     draw_hsi_xgl.c draw_starfield_xgl.c special_xv.c \
  82.     draw_image_xgl.c draw_bsp_xgl.c draw_objects_xgl.c $(ROBOT_ARCH)
  83.  
  84.  
  85. dstar: $(INCS) $(OBJ)
  86.     cc $(CFLAGS) -o dstar $(OBJ) \
  87.         -L$(OPENWINHOME)/lib $(LIBXGL) -lm -lxview -lolgx -lX11
  88.  
  89. dstar_xglsv: $(INCS) $(XGL_SV_OBJ)
  90.     cc $(CFLAGS) -o dstar_xglsv $(XGL_SV_OBJ) \
  91.         $(LIBXGLSW) -lm -lsuntool -lsunwindow -lpixrect
  92.  
  93. dstar_gp: $(INCS) $(GP_OBJS) dev_gp1.a
  94.     cc $(CFLAGS) -o dstar_gp $(GP_OBJS) dev_gp1.a \
  95.         -lm -lsuntool -lsunwindow -lpixrect
  96.  
  97. all: dstar robot
  98.  
  99. xv:    dstar_xv
  100.  
  101. sv xgl:    dstar_xglsv
  102.  
  103. gp:    dstar_gp
  104.  
  105.  
  106. robot:    $(ROBOT_OBJS)
  107.     cc $(CFLAGS) -o robot $(ROBOT_OBJS) -lm -lxview -lolgx -lX11
  108. #    cc $(CFLAGS) -o robot $(ROBOT_OBJS) -lm -lsunwindow -lpixrect
  109.  
  110.  
  111. tester:    tester.o
  112.     cc $(CFLAGS) -o tester tester.o -lsuntool -lsunwindow -lpixrect
  113.  
  114. archive: README Makefile $(INCS) $(SRC) $(ROBOT_ARCH)
  115.     cshar -a -M 200000 -o ar README Makefile $(INCS) $(SRC) $(ROBOT_ARCH)
  116.  
  117. xgl_sv_archive: README Makefile $(INCS) $(XGL_SV_SRC) $(ROBOT_ARCH)
  118.     cshar -a -M 200000 -o ar README Makefile $(INCS) $(XGL_SV_SRC) $(ROBOT_ARCH)
  119.  
  120. gp_archive: README Makefile $(INCS) $(SRCS) $(ROBOT_ARCH)
  121.     cshar -a -M 200000 -o ar README Makefile $(INCS) $(SRCS) $(ROBOT_ARCH)
  122.  
  123. tarchive: README Makefile $(INCS) $(FULL_ARCH)
  124.     tar -cvf - README Makefile $(INCS) $(FULL_ARCH) | \
  125.         compress -c > dstar.tar.Z
  126.  
  127. clean:
  128.     rm -f *.o core
  129.