home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / maths / plplot / plplot_2 / sys / dos / emx / makefile < prev    next >
Encoding:
Makefile  |  1994-05-26  |  7.6 KB  |  330 lines

  1. # Makefile for PLPLOT
  2. #
  3. # This makefile is for building PLPLOT using emx0.8h + gcc
  4. #  - DOS+OS/2 port of GNU CC by Eberhard Mattes
  5. #
  6. # This makefile uses DMAKE (as advised in the emx documentaion)
  7. #
  8. # Note that Fortran support in is the makefile and uses f2c and gcc,
  9. # but has not been tested
  10. #
  11. # Questions or problems, send (e)mail to:
  12. #    <insert supporter's name here>
  13.  
  14. PLLIB    = plplt
  15. PLSTB    = plstb
  16.  
  17. CC    = gcc
  18. CFLAGS    = -ansi -Wall # -O2
  19. F77    =
  20. FFLAGS    =
  21. LDC    = gcc
  22. LDF    = gcc
  23. LIBC    =  -L../lib -llib$(PLLIB) -lm -lgraph -lvesa
  24. LIBF    =  -L../lib -llib$(PLSTB) -llib$(PLLIB) -lgraph -lvesa -lf2c -lm
  25. BINDFLAGS= -aq -acim
  26. BINDCMD=emxbind -bs -v
  27.  
  28. # PLDEVICES    = -DNULLDEV -DPS -DLJII -DPLMETA -DHP7470 -DIMP -DEMXVESA
  29. PLDEVICES = -DPLMETA -DHP7470 -DEMXVESA
  30.  
  31. # Rules
  32. .SUFFIXES:
  33. .SUFFIXES: .o .c .f
  34.  
  35. .c.o:
  36.     $(CC) -c $(CFLAGS) $*.c
  37.  
  38. .f.o:
  39. #    $(F77) -c $(FFLAGS) $*.f
  40.     -f2c -A $*.f
  41.     $(CC) -c $(CFLAGS) $*.c
  42.     -$(RM) $(RMFLAGS) $*.c
  43.  
  44. .c.exe:
  45.     $(CC) $(CFLAGS) $*.c -o $* $(LIBC)
  46.     $(BINDCMD) $* $(BINDFLAGS)
  47.     -$(RM) $(RMFLAGS) $*
  48.  
  49. .f.exe:
  50. #    $(F77) -c $(FFLAGS) $*.f
  51.     f2c -A $*.f
  52.     $(CC) $(CFLAGS) $*.c -o $* $(LIBC)
  53.     $(BINDCMD) $* $(BINDFLAGS)
  54.     -$(RM) $(RMFLAGS) $* $*.c
  55.  
  56.  
  57. # Object file macros
  58.  
  59. OBJ =    \
  60.     pdfutils.o \
  61.     plargs.o \
  62.     plbox.o \
  63.     plcont.o \
  64.     plcore.o \
  65.     plctest.o \
  66.     plctrl.o \
  67.     plcvt.o \
  68.     pldtik.o \
  69.     plfill.o \
  70.     plfont.o \
  71.     plhist.o \
  72.     plline.o \
  73.     plot3d.o \
  74.     plpage.o \
  75.     plsdef.o \
  76.     plshade.o \
  77.     plstream.o \
  78.     plstring.o \
  79.     plsym.o \
  80.     pltick.o \
  81.     plvpor.o \
  82.     plwind.o
  83.  
  84. DRIVERS_OBJ = \
  85.     hpgl.o \
  86.     impress.o \
  87.     ljii.o \
  88.     null.o \
  89.     plbuf.o \
  90.     plmeta.o \
  91.     ps.o \
  92.     tek.o \
  93.     xfig.o \
  94.     emxvga.o
  95.  
  96. # Support files for font generators.
  97.  
  98. FONT_OBJ = \
  99.     font01.o \
  100.     font02.o \
  101.     font03.o \
  102.     font04.o \
  103.     font05.o \
  104.     font06.o \
  105.     font07.o \
  106.     font08.o \
  107.     font09.o \
  108.     font10.o \
  109.     font11.o
  110.  
  111. # C language stubs for linking Plplot to Fortran.
  112.  
  113. CSTUB_OBJ = \
  114.     sc3d.o \
  115.     sccont.o \
  116.     scstubs.o
  117.  
  118. # Fortran language stubs for linking Plplot to Fortran.
  119.  
  120. FSTUB_OBJ = \
  121.     strutil.o \
  122.     sfstubs.o
  123.  
  124. # Library dependencies
  125.  
  126. default:    libc plrender libf
  127.  
  128. libs:    libc libf
  129. libc:    ../lib/lib$(PLLIB).a
  130. libf:    ../lib/lib$(PLSTB).a
  131.  
  132. ../lib/lib$(PLLIB).a:    $(OBJ) $(DRIVERS_OBJ)
  133.     ar rvc lib$(PLLIB).a @$(mktmp $(^:t"\n")\n)
  134.     +copy lib$(PLLIB).a ..\lib\lib$(PLLIB).a
  135.     ar rvs ../lib/lib$(PLLIB).a
  136.  
  137. ../lib/lib$(PLSTB).a:    $(CSTUB_OBJ) $(FSTUB_OBJ)
  138.     ar rvc lib$(PLLIB).a @$(mktmp $(^:t"\n")\n)
  139.     +copy lib$(PLSTB).a ..\lib\lib$(PLSTB).a
  140.     ar rvs ../lib/lib$(PLSTB).a
  141.  
  142. # In case you REALLY mean it!
  143.  
  144. force: links libs
  145.  
  146. # First time only, should be executed from $(PLDIR)tmp\
  147.  
  148. links: linkmain linkstubs
  149.  
  150. linkmain:
  151.     +copy ..\src\*.c .
  152.     +copy ..\include\*.h .
  153.     +copy ..\examples\c\*.c .
  154.     +copy ..\drivers\*.c .
  155.     +copy ..\fonts\*.* .
  156.     +copy ..\utils\*.* .
  157.     +copy ..\lib\*.fnt .
  158.     +copy ..\sys\dos\emx\*.c .
  159.  
  160. linkstubs:    
  161.     +copy ..\src\stubc\*.c .
  162.     +copy ..\src\stubf\sgl\*.f .
  163.     +copy ..\examples\f77\sgl\*.f .
  164.  
  165. #----------------------------------------------------------------------#
  166. # Font files.
  167. # Note 6 font files actually created.
  168. # sfont - standard font
  169. # xfont - extended fonts
  170.  
  171. fonts:    sfont xfont
  172.     +copy *.fnt ..\lib
  173.  
  174. sfont:    ../lib/plstnd.fnt
  175. xfont:    ../lib/plxtnd.fnt
  176.  
  177. ../lib/plstnd.fnt: stndfont.o $(FONT_OBJ)
  178.     $(CC) $(CFLAGS) -o stndfont @$(mktmp $(^:t"\n")\n) $(LIBC)
  179.     $(BINDCMD) stndfont $(BINDFLAGS)
  180.     -$(RM) $(RMFLAGS) stndfont
  181.  
  182. ../lib/plxtnd.fnt: xtndfont.o $(FONT_OBJ)
  183.     $(CC) $(CFLAGS) -o xtndfont @$(mktmp $(^:t"\n")\n) $(LIBC)
  184.     $(BINDCMD) xtndfont $(BINDFLAGS)
  185.  
  186. #     -$(RM) $(RMFLAGS) $*
  187.  
  188. ##############################################################################
  189. #
  190. # Object file dependencies.
  191.  
  192. # source files
  193.  
  194. plargs.o:    plargs.c plplotP.h plplot.h plstream.h
  195. plbox.o:    plbox.c plplotP.h plplot.h
  196. plcont.o:    plcont.c plplotP.h plplot.h
  197. plctest.o:    plctest.c plplotP.h plplot.h
  198. plcvt.o:    plcvt.c plplotP.h plplot.h
  199. pldtik.o:    pldtik.c plplotP.h plplot.h
  200. plfill.o:    plfill.c plplotP.h plplot.h
  201. plhist.o:    plhist.c plplotP.h plplot.h
  202. plline.o:    plline.c plplotP.h plplot.h
  203. plot3d.o:    plot3d.c plplotP.h plplot.h
  204. plpage.o:    plpage.c plplotP.h plplot.h
  205. plsdef.o:    plsdef.c plplotP.h plplot.h
  206. plshade.o:    plshade.c plplotP.h plplot.h
  207. plstream.o:    plstream.c plplotP.h plplot.h plstream.h
  208. plstring.o:    plstring.c plplotP.h plplot.h
  209. plsym.o:    plsym.c plplotP.h plplot.h
  210. pltick.o:    pltick.c plplotP.h plplot.h
  211. plvpor.o:    plvpor.c plplotP.h plplot.h
  212. plwind.o:    plwind.c plplotP.h plplot.h
  213. pdfutils.o:    pdfutils.c plplotP.h plplot.h
  214.  
  215. # C language stubs for linking Plplot to Fortran.
  216.  
  217. sc3d.o:    sc3d.c plstubs.h plplotP.h plplot.h
  218. scstubs.o:    scstubs.c plstubs.h plplotP.h plplot.h
  219. sccont.o:    sccont.c plstubs.h plplotP.h plplot.h
  220.  
  221.  
  222. # Fortran language stubs for linking Plplot to Fortran.
  223.  
  224. strutil.o:    strutil.f
  225. sfstubs.o:    sfstubs.f
  226.  
  227. #----------------------------------------------------------------------#
  228. # Explicit rules
  229. #
  230. # plfont.c and plctrl.c need to know the install directory
  231. # Also, plfont.c may have font flags passed in
  232.  
  233. plfont.o:    plfont.c plplotP.h plplot.h
  234.     $(CC) -c $(CFLAGS) $*.c
  235.  
  236. plctrl.o:    plctrl.c plplotP.h plplot.h
  237.     $(CC) -c $(CFLAGS) $*.c
  238.  
  239. # plcore.c and all the drivers need to know $(PLDEVICES).  The guts
  240. # of the driver routine are not compiled if its name is not present in
  241. # the device list.  You may want to leave drivers for specific systems
  242. # (Amiga, MS-DOS, OS/2, etc) out of this list.
  243.  
  244. plcore.o:    plcore.c plcore.h plplotP.h plplot.h plstream.h drivers.h
  245.     $(CC) -c $(CFLAGS) $(PLDEVICES) $*.c
  246.  
  247. dg300.o:    dg300.c plplotP.h plplot.h plstream.h drivers.h
  248.     $(CC) -c $(CFLAGS) $(PLDEVICES) $*.c
  249.  
  250. hpgl.o:    hpgl.c plplotP.h plplot.h plstream.h drivers.h
  251.     $(CC) -c $(CFLAGS) $(PLDEVICES) $*.c
  252.  
  253. impress.o:    impress.c plplotP.h plplot.h plstream.h drivers.h
  254.     $(CC) -c $(CFLAGS) $(PLDEVICES) $*.c
  255.  
  256. ljii.o:        ljii.c plplotP.h plplot.h plstream.h drivers.h
  257.     $(CC) -c $(CFLAGS) $(PLDEVICES) $*.c
  258.  
  259. null.o:        null.c plplotP.h plplot.h plstream.h drivers.h
  260.     $(CC) -c $(CFLAGS) $(PLDEVICES) $*.c
  261.  
  262. ps.o:        ps.c plplotP.h plplot.h plstream.h drivers.h
  263.     $(CC) -c $(CFLAGS) $(PLDEVICES) $*.c
  264.  
  265. tek.o:        tek.c plplotP.h plplot.h plstream.h drivers.h
  266.     $(CC) -c $(CFLAGS) $(PLDEVICES) $*.c
  267.  
  268. plbuf.o:    plbuf.c plplotP.h plplot.h plstream.h drivers.h metadefs.h
  269.     $(CC) -c $(CFLAGS) $*.c
  270.  
  271. plmeta.o:    plmeta.c plplotP.h plplot.h plstream.h drivers.h metadefs.h
  272.     $(CC) -c $(CFLAGS) $(PLDEVICES) $*.c
  273.  
  274. xfig.o:        xfig.c plplotP.h plplot.h plstream.h drivers.h
  275.     $(CC) -c $(CFLAGS) $(PLDEVICES) $*.c
  276.  
  277. emxvga.o:    emxvga.c plplotP.h plplot.h plstream.h drivers.h
  278.     $(CC) -c $(CFLAGS) $(PLDEVICES) $*.c
  279.  
  280. ##############################################################################
  281. #
  282. # Utility programs.
  283.  
  284. plrender.o:    plrender.c plplotP.h plplot.h metadefs.h pdf.h
  285.  
  286. plrender:    plrender.exe
  287.  
  288. plrender.exe:    plrender.o
  289.     $(LDC) plrender.o -o plrender $(LIBC)
  290.     $(BINDCMD) plrender $(BINDFLAGS)
  291.     -$(RM) $(RMFLAGS) $*
  292.  
  293. #----------------------------------------------------------------------#
  294. # Build all the demos
  295.  
  296. # To verify that PLPLOT works with C++, copy x01c.c to xa.cc and make xa
  297.  
  298. xa:    xa.cc
  299.     $(CC) $(CFLAGS) -g $*.cc -o $* -L../lib -llib$(PLLIB) -lm -lgr -lpc
  300.     $(BINDCMD) $* $(BINDFLAGS)
  301.     -$(RM) $(RMFLAGS) $*
  302.  
  303. # Example programs, in c.
  304.  
  305. cdemos: x01c.exe x02c.exe x03c.exe x04c.exe\
  306.         x05c.exe x06c.exe x07c.exe x08c.exe\
  307.         x09c.exe x10c.exe x11c.exe x12c.exe\
  308.         x13c.exe x15c.exe tutor.exe
  309.  
  310. ##############################################################################
  311. #
  312. # Example programs, in Fortran.
  313.  
  314. fdemos: x01f.exe x02f.exe x03f.exe x04f.exe\
  315.         x05f.exe x06f.exe x07f.exe x08f.exe\
  316.         x09f.exe x10f.exe x11f.exe x12f.exe\
  317.         x13f.exe
  318.  
  319. ##############################################################################
  320.  
  321. # cleanup targets
  322.  
  323. clean:
  324.     -$(RM) $(RMFLAGS) $(CDEMOS) $(FDEMOS) *.plm *.tek *.ps *.exe
  325.  
  326. realclean:
  327.     -$(RM) $(RMFLAGS) $(CDEMOS) $(FDEMOS) *.o *.c *.h *.f *.plm *.tek *.ps \
  328.      *.fnt Makefile plrender ..\lib\libpl*.* *.exe
  329.  
  330.