[BACK]Return to makefile.os2 CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gnuplot

Annotation of OpenXM_contrib/gnuplot/makefile.os2, Revision 1.1

1.1     ! maekawa     1: #
        !             2: # $Id: makefile.os2,v 1.27 1998/04/14 00:15:54 drd Exp $
        !             3: #
        !             4: # Makefile for use with emx (and above) and GNUMake
        !             5: #   on OS/2 3.0 and above (might also work for OS/2 2.x)
        !             6: #
        !             7: # last modification date: 19981205
        !             8: #
        !             9:
        !            10: # We depend on using cmd.exe (or a compatible one)
        !            11: SHELL=cmd.exe
        !            12:
        !            13: #
        !            14: # ***************** Begin of Configuration section ***************************
        !            15: #
        !            16:
        !            17: # Comment out the definition lines to disable the according features:
        !            18:
        !            19: # X11 driver
        !            20: # requires installed XFree86
        !            21: X11=1
        !            22:
        !            23: # GD (GIF) device driver
        !            24: # requires GD library (not part of gnuplot)
        !            25: GD=1
        !            26:
        !            27: # PNG device driver
        !            28: # requires PNG and Z libraries (not part of gnuplot)
        !            29: PNG=1
        !            30:
        !            31: # VESAkit support
        !            32: # requires SVGA- and VESA Kit (not part of gnuplot)
        !            33: VESA=1
        !            34:
        !            35: # GNU_ReadLine support
        !            36: # requires GNU readline library (static or DLL; not part of gnuplot)
        !            37: GNU_RL=1
        !            38:
        !            39: # DEBUGging support
        !            40: # creates binaries suitable for debugging. Some bugs may come and go
        !            41: # as opposed to a production build since we lower the optimization level
        !            42: # DEBUG=1
        !            43:
        !            44: # MOUSE support for PM terminal
        !            45: # (not yet supported in official release)
        !            46: # MOUSE=1
        !            47:
        !            48: #
        !            49: # ****************** End of Configuration section ****************************
        !            50: #
        !            51:
        !            52: #
        !            53: # Miscellaneous setup
        !            54: #
        !            55:
        !            56: .PHONY: all runtime alldocs demo binaries infomin clean veryclean
        !            57: .SUFFIXES: .c .trm .o .obj .exe
        !            58:
        !            59: # seems to be a reasonable default ...
        !            60: default: runtime
        !            61:
        !            62: # a help screen
        !            63: help:
        !            64:           @echo " Usage: $(MAKE) -f makefile.os2 target"
        !            65:           @echo "   target is one of:"
        !            66:           @echo "   all runtime alldocs demo binaries infomin help clean veryclean"
        !            67:
        !            68: #
        !            69: # Definitions of flags and symbols used by makefile.all and makefile.os2
        !            70: #
        !            71:
        !            72: # these definitions are used by makefile.all
        !            73: T=term/
        !            74: D=docs/
        !            75: L=$(D)latextut/
        !            76: M=demo/
        !            77:
        !            78: #
        !            79: # Definitions valid for all targets on OS/2
        !            80: #
        !            81:
        !            82: OS2DIR = os2
        !            83: DOCDIR = docs
        !            84: DEMODIR=demo
        !            85: TERMDIR=term
        !            86:
        !            87: OS2TERMS= $(TERMDIR)\pm.trm
        !            88: ifdef X11
        !            89:        OS2TERMS += $(TERMDIR)\x11.trm
        !            90: endif
        !            91: ifdef VESA
        !            92:        OS2TERMS += $(TERMDIR)\emxvga.trm
        !            93: endif
        !            94:
        !            95:
        !            96: # where to place gnuplot.gih helpfile
        !            97: HELPFILE = gnuplot.gih
        !            98:
        !            99: #
        !           100: # 3 sets of variables are defined and used to create
        !           101: #  (1): gnuplot.exe
        !           102: #   2 : gnupmdrv.exe (the PM-driver executable)
        !           103: #   3 : utilities like doc2*.exe, bf_test.exe, ...
        !           104: #
        !           105: CC  = gcc
        !           106: CC2 = gcc
        !           107: CC3 = gcc
        !           108: O  = o
        !           109: O2 = obj
        !           110: O3 = o
        !           111:
        !           112: # Flags for compiler and linker under OS/2
        !           113: OS2FLAGS = -DOS2 -DHELPFILE=\"$(HELPFILE)\"
        !           114:
        !           115: # Flags for compiling with EMX/GCC
        !           116: # Special note: -ffloat-store is necessary to avoid some
        !           117: # strange behaviour (confirmed for gcc 2.7.x and graphics.c)
        !           118: EMXSPECIFIC = -ffloat-store -DREADLINE -DHAVE_STRNICMP -DPIPES -DHAVE_STRERROR -DHAVE_SYS_SELECT_H -DHAVE_SYS_STAT_H
        !           119: LIBS =
        !           120: ifdef GNU_RL
        !           121:   EMXSPECIFIC += -DGNU_READLINE
        !           122:   LIBS += -lreadline -ltermcap
        !           123: endif
        !           124:
        !           125: #
        !           126: # Choose flags suitable for a debugging or for a production build
        !           127: #
        !           128: ifdef DEBUG
        !           129: CFLAGS  = -g $(OS2FLAGS) $(EMXSPECIFIC) -Wall -Wno-comment -O0 -Zmt
        !           130: LFLAGS  = -g -Zcrtdll -Zmt
        !           131: CFLAGS2 = -g $(OS2FLAGS) $(EMXSPECIFIC) -Zomf -Zsys -Zmt -Wall -O0
        !           132: LFLAGS2 = -g -Zomf -Zmt -Zcrtdll
        !           133: CFLAGS3 = -g $(OS2FLAGS) $(EMXSPECIFIC) -Wall -Wno-comment -O0
        !           134: LFLAGS3 = -g
        !           135: else
        !           136: CFLAGS  = $(OS2FLAGS) $(EMXSPECIFIC) -O2 -Wall -Wno-unused -Wno-comment -Zmt
        !           137: LFLAGS  = -s -Zcrtdll -Zmt
        !           138: CFLAGS2 = $(OS2FLAGS) $(EMXSPECIFIC) -Zomf -Zcrtdll -Zmt -O2 -Wall -Wno-unused
        !           139: LFLAGS2 = -s -Zomf -Zmt -Zsys
        !           140: CFLAGS3 = $(OS2FLAGS) $(EMXSPECIFIC) -O2 -Wall -Wno-unused -Wno-comment
        !           141: LFLAGS3 = -s
        !           142: endif
        !           143:
        !           144: #
        !           145: # Settings for the terminals to be included
        !           146: #
        !           147: TERMFLAGS = -I. -I$(T)
        !           148:
        !           149: # All terminals available via #defines should be listed below
        !           150: # Some terminals can be en/disabled in the configuration at the
        !           151: # beginning of this Makefile.os2 but others may still require
        !           152: # changes in term.h
        !           153:
        !           154: #
        !           155: # GIF-support
        !           156: ifdef GD
        !           157: TERMFLAGS += -DHAVE_LIBGD
        !           158: TERMLIBS  += -lgd
        !           159: endif
        !           160: # PNG-support
        !           161: ifdef PNG
        !           162: TERMFLAGS += -DHAVE_LIBPNG
        !           163: TERMLIBS  += -lpng -lz
        !           164: endif
        !           165: # SVGA-/VESAkit support
        !           166: ifdef VESA
        !           167: TERMFLAGS += -DEMXVESA
        !           168: TERMLIBS  += -ljmgraph -lvesa
        !           169: endif
        !           170: # X11 support
        !           171: ifdef X11
        !           172: TERMFLAGS += -DX11
        !           173: endif
        !           174: # MOUSE support for PM terminal
        !           175: ifdef MOUSE
        !           176: TERMFLAGS += -DUSE_MOUSE
        !           177: endif
        !           178:
        !           179: #
        !           180: # Default Rules
        !           181: #
        !           182: .c.$(O):
        !           183:        $(CC)  $(CFLAGS) $(TERMFLAGS) -o $*.$(O) -c $*.c
        !           184: .c.obj:
        !           185:        $(CC2) $(CFLAGS2) -o $*.obj -c $*.c
        !           186:
        !           187: #
        !           188: # Include dependencies valid for all platforms from makefile.all
        !           189: #
        !           190: include makefile.all
        !           191:
        !           192: #
        !           193: # Pre-defined sets of targets:
        !           194: #
        !           195: all:         runtime demo
        !           196: alldocs:     gnuplot.gih gnuplot.inf gnuplot.html gnuplot.info \
        !           197:              gnuplot.dvi gnuplot.ps
        !           198: runtime:     binaries infomin gnuplot.inf
        !           199: infomin:     gnupmdrv.hlp gnuplot.gih
        !           200: demo:        $(M)binary1 $(M)binary2 $(M)binary3
        !           201: ifdef X11
        !           202: binaries: gnuplot.exe gnupmdrv.exe gnuplot_x11.exe
        !           203: else
        !           204: binaries: gnuplot.exe gnupmdrv.exe
        !           205: endif
        !           206:
        !           207: OBJS = $(COREOBJS) version.$(O)
        !           208: term.$(O): $(OS2TERMS) term.h
        !           209:
        !           210: gnuplot.exe: $(OBJS)
        !           211:        $(CC) -o $@ $(OBJS) $(TERMLIBS) $(LIBS) $(LFLAGS)
        !           212:
        !           213: #
        !           214: # Build the PM outboard driver
        !           215: #
        !           216: $(OS2DIR)\gnupmdrv.$(O2):  $(OS2DIR)\gnupmdrv.c   $(OS2DIR)\gnupmdrv.h
        !           217: $(OS2DIR)\gclient.$(O2):   $(OS2DIR)\gclient.c    $(OS2DIR)\gnupmdrv.h
        !           218: $(OS2DIR)\dialogs.$(O2):   $(OS2DIR)\dialogs.c    $(OS2DIR)\gnupmdrv.h  $(OS2DIR)\dialogs.h
        !           219: $(OS2DIR)\print.$(O2):     $(OS2DIR)\print.c      $(OS2DIR)\gnupmdrv.h
        !           220: $(OS2DIR)\gnupmdrv.res :   $(OS2DIR)\gnupmdrv.rc  $(OS2DIR)\gnuplot.ico $(OS2DIR)\dialogs.h
        !           221:        cd $(OS2DIR) & rc -r gnupmdrv.rc & cd ..
        !           222: OS2OBJ = $(OS2DIR)\gnupmdrv.$(O2) $(OS2DIR)\gclient.$(O2) $(OS2DIR)\print.$(O2) \
        !           223:          $(OS2DIR)\dialogs.$(O2)
        !           224: gnupmdrv.exe: $(OS2OBJ) $(OS2DIR)\gnupmdrv.res $(OS2DIR)\gnupmdrv.def
        !           225:        $(CC2) $(LFLAGS2) -o $@ $(OS2OBJ) $(OS2DIR)\gnupmdrv.res $(OS2DIR)\gnupmdrv.def
        !           226: gnupmdrv.hlp: $(OS2DIR)\gnupmdrv.ipf
        !           227:        ipfc $(OS2DIR)\gnupmdrv.ipf
        !           228:        move $(OS2DIR)\gnupmdrv.hlp .
        !           229:
        !           230: #
        !           231: # Build the X11 outboard driver
        !           232: #
        !           233:
        !           234: # X11 libraries
        !           235: X11LIBS = -lX11 -lsocket -Zcrtdll
        !           236: # X11 includes
        !           237: X11INCLUDES = -I$(X11ROOT)/xfree86/include
        !           238: X11FLAGS= -D__ST_MT_ERRNO -Zmtd -Zsysv-signals
        !           239:
        !           240: gnuplot_x11.exe: gplt_x11.o stdfn.o
        !           241:        $(CC) $(LFLAGS) $(X11FLAGS) $(EMXSPECIFIC) -o $@ $^ $(X11LIBS)
        !           242:
        !           243: gplt_x11.o: gplt_x11.c
        !           244:        $(CC) $(CFLAGS) $(X11FLAGS) $(EMXSPECIFIC) $(X11INCLUDES) -c -o $@ $<
        !           245:
        !           246: #
        !           247: # Create documentation in various formats
        !           248: #
        !           249: # Change the call to LaTeX if the "latex2e" is not appropiate for you
        !           250: # (and don't care about the strange way it's implemented ...)
        !           251: gnuplot.dvi: gnuplot.tex
        !           252:        copy gnuplot.tex $(DOCDIR)\gnuplot_2.tex
        !           253:        cd $(DOCDIR) & latex2e gnuplot_2.tex
        !           254:        move $(DOCDIR)\gnuplot_2.dvi gnuplot.dvi
        !           255:        del $(DOCDIR)\gnuplot_2*
        !           256: gnuplot.tex:  $(DOCDIR)\gnuplot.doc doc2tex.exe
        !           257:        doc2tex $(DOCDIR)\gnuplot.doc gnuplot.tex
        !           258: gnuplot.ps: gnuplot.dvi
        !           259:        dvips -o gnuplot.ps gnuplot.dvi
        !           260: gnuplot.inf:  $(DOCDIR)\gnuplot.ipf
        !           261:        ipfc -i $(DOCDIR)\gnuplot.ipf gnuplot.inf
        !           262: gnuplot.gih:  $(DOCDIR)\gnuplot.doc doc2gih.exe
        !           263:        doc2gih $(DOCDIR)\gnuplot.doc gnuplot.gih
        !           264: gnuplot.html: $(DOCDIR)\gnuplot.doc doc2html.exe
        !           265:        doc2html $(DOCDIR)\gnuplot.doc gnuplot.html
        !           266: gnuplot.info: $(DOCDIR)\gnuplot.doc doc2info.exe
        !           267:        doc2info <$(DOCDIR)\gnuplot.doc >gnuplot.info
        !           268: gnuplot.texi: $(DOCDIR)\gnuplot.doc $(DOCDIR)\doc2texi.pl
        !           269:        perl $(DOCDIR)\doc2texi.pl $(DOCDIR)\gnuplot.doc >$(DOCDIR)\gnuplot.texi
        !           270: gnuplot.rtf:  $(DOCDIR)\gnuplot.doc doc2rtf.exe
        !           271:        doc2rtf $(DOCDIR)\gnuplot.doc gnuplot.rtf
        !           272: gnuplot.ms:   $(DOCDIR)\gnuplot.doc doc2ms.exe
        !           273:        doc2ms $(DOCDIR)\gnuplot.doc gnuplot.ms
        !           274: $(DOCDIR)\gnuplot.ipf:  $(DOCDIR)\gnuplot.doc doc2ipf.exe
        !           275:        doc2ipf $(DOCDIR)\gnuplot.doc $(DOCDIR)\gnuplot.ipf
        !           276: #
        !           277: # Tools for converting the documentation from docs\gnuplot.doc
        !           278: # in various formats
        !           279: #
        !           280: doc2gih.exe doc2ipf.exe doc2html.exe doc2info.exe doc2tex.exe doc2rtf.exe: \
        !           281:             $(DOCDIR)\termdoc.c $(DOCDIR)\xref.c $(DOCDIR)\allterm.h
        !           282: #
        !           283: # To include all terminal documentations in the documentation
        !           284: # uncomment the following 2 lines
        !           285: # doc2gih.exe doc2ipf.exe doc2html.exe doc2info.exe doc2tex.exe doc2rtf.exe: \
        !           286: #           $(DOCDIR)\termdoc.c $(DOCDIR)\xref.c $(DOCDIR)\allterm.h
        !           287:
        !           288: $(DOCDIR)\allterm.h: $(CORETERM)
        !           289: #   echo > $@
        !           290:        cd $(TERMDIR) & type *.trm > ..\$@
        !           291: doc2gih.exe:  $(DOCDIR)\doc2gih.c $(DOCDIR)\termdoc.c $(OS2TERMS)
        !           292:        $(CC3) $(CFLAGS3) $(TERMFLAGS) -DALL_TERM_DOC -o $@ $(DOCDIR)\doc2gih.c $(DOCDIR)\termdoc.c
        !           293: doc2ipf.exe:  $(DOCDIR)\doc2ipf.c $(DOCDIR)\termdoc.c $(DOCDIR)\xref.c $(OS2TERMS)
        !           294:        $(CC3) $(CFLAGS3) $(TERMFLAGS) -DALL_TERM_DOC -o $@ $(DOCDIR)\doc2ipf.c $(DOCDIR)\termdoc.c $(DOCDIR)\xref.c
        !           295: doc2tex.exe:  $(DOCDIR)\doc2tex.c $(DOCDIR)\termdoc.c $(OS2TERMS) $(DOCDIR)\allterm.h
        !           296:        $(CC3) $(CFLAGS3) $(TERMFLAGS) -DALL_TERM_DOC -o $@ $(DOCDIR)\doc2tex.c $(DOCDIR)\termdoc.c
        !           297: doc2html.exe: $(DOCDIR)\doc2html.c $(DOCDIR)\termdoc.c $(DOCDIR)\xref.c $(OS2TERMS)
        !           298:        $(CC3) $(CFLAGS3) $(TERMFLAGS) -DALL_TERM_DOC -o $@ $(DOCDIR)\doc2html.c $(DOCDIR)\termdoc.c $(DOCDIR)\xref.c
        !           299: doc2info.exe: $(DOCDIR)\doc2info.c $(DOCDIR)\termdoc.c $(DOCDIR)\xref.c $(OS2TERMS)
        !           300:        $(CC3) $(CFLAGS3) $(TERMFLAGS) -DALL_TERM_DOC -o $@ $(DOCDIR)\doc2info.c $(DOCDIR)\termdoc.c $(DOCDIR)\xref.c
        !           301: doc2rtf.exe:  $(DOCDIR)\doc2rtf.c $(DOCDIR)\termdoc.c $(DOCDIR)\xref.c $(OS2TERMS)
        !           302:        $(CC3) $(CFLAGS3) $(TERMFLAGS) -DALL_TERM_DOC -o $@ $(DOCDIR)\doc2rtf.c $(DOCDIR)\termdoc.c $(DOCDIR)\xref.c
        !           303: doc2ms.exe:   $(DOCDIR)\doc2ms.c $(DOCDIR)\termdoc.c $(OS2TERMS)
        !           304:        $(CC3) $(CFLAGS3) $(TERMFLAGS) -DALL_TERM_DOC -o $@ $(DOCDIR)\doc2ms.c $(DOCDIR)\termdoc.c
        !           305: #
        !           306: # Create binary demo files
        !           307: #
        !           308: $(M)binary1: $(M)bf_test.exe
        !           309:        cd $(DEMODIR) & bf_test.exe & cd ..
        !           310: $(M)binary2: $(M)bf_test.exe
        !           311:        cd $(DEMODIR) & bf_test.exe & cd ..
        !           312: $(M)binary3: $(M)bf_test.exe
        !           313:        cd $(DEMODIR) & bf_test.exe & cd ..
        !           314: $(M)bf_test.exe : bf_test.c binary.$(O) alloc.$(O)
        !           315:        $(CC3) $(CFLAGS3) -o $@ bf_test.c binary.$(O) alloc.$(O)
        !           316: #
        !           317: # Clean up
        !           318: #
        !           319:
        !           320: # Clean up all files temporary used
        !           321: clean:
        !           322:        IF EXIST *.$(O)                  DEL *.$(O)
        !           323:        IF EXIST *.$(O2)                 DEL *.$(O2)
        !           324:        cd $(OS2DIR) & IF EXIST *.$(O2)  DEL *.$(O2)
        !           325:        IF EXIST $(OS2DIR)\gnupmdrv.res  DEL $(OS2DIR)\gnupmdrv.res
        !           326:        IF EXIST demo\bf_test.exe        DEL demo\bf_test.exe
        !           327:        IF EXIST doc2*.exe               DEL doc2*.exe
        !           328:        IF EXIST gnuplot.ipf             DEL gnuplot.ipf
        !           329:        IF EXIST core                    DEL core
        !           330:        IF EXIST $(DOCDIR)\allterm.h     DEL $(DOCDIR)\allterm.h
        !           331:
        !           332: # Clean up ALL files that were not part of the source distribution
        !           333: veryclean: clean
        !           334:        IF EXIST *.exe.exe               DEL gnuplot.exe
        !           335:        IF EXIST gnupmdrv.hlp            DEL gnupmdrv.hlp
        !           336:        IF EXIST gnuplot.gih             DEL gnuplot.gih
        !           337:        IF EXIST gnuplot.inf             DEL gnuplot.inf
        !           338:        IF EXIST gnuplot.dvi             DEL gnuplot.dvi
        !           339:        IF EXIST gnuplot.htm             DEL gnuplot.htm
        !           340:        IF EXIST gnuplot.tex             DEL gnuplot.tex
        !           341:        IF EXIST gnuplot.texi            DEL gnuplot.texi
        !           342:        IF EXIST gnuplot.info            DEL gnuplot.info
        !           343:        IF EXIST gnuplot.ms              DEL gnuplot.ms
        !           344:        IF EXIST gnuplot.rtf             DEL gnuplot.rtf
        !           345:        IF EXIST gnuplot.ps              DEL gnuplot.ps
        !           346:        cd demo & IF EXIST binary?       DEL binary?

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>