home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / c / xv221src / makefile < prev    next >
Encoding:
Makefile  |  1992-12-31  |  9.4 KB  |  286 lines

  1. # Makefile for xv
  2.  
  3.  
  4. # your C compiler (and options) of choice
  5. #
  6. # if compiling on a Mips machine, try this: 
  7. #    CCOPTS = -Olimit 600 -systype bsd43
  8.  
  9. # if you want to use gcc, use this line, or something like it.
  10. CC = gcc
  11. # CC = cc
  12.  
  13. # Uncomment the second CCOPTS entry here to debug.
  14. CCOPTS = -O -fomit-frame-pointer -fstrength-reduce -finline-functions -DMSDOS
  15. #CCOPTS = -g -O -fomit-frame-pointer -fstrength-reduce -finline-functions -DMSDOS
  16.  
  17.  
  18. # if you're using a Sun running OpenWindows, you may want to add these two
  19. # options to the CCOPTS line, so it finds the libs and include files
  20. #   -L/usr/openwin/lib -I/usr/openwin/include
  21.  
  22.  
  23.  
  24. ################ CONFIGURATION OPTIONS #################
  25.  
  26. # if, for whatever reason, you're unable to get the JPEG library to compile
  27. # on your machine, *COMMENT OUT* the following lines
  28. #
  29. # Also, comment out the LIBJPEG dependancy at the end of this Makefile
  30. #
  31. JPEG = -DHAVE_JPEG
  32. JPEGDIR = jpeg
  33. LIBJPEG = $(JPEGDIR)/libjpeg.a
  34. JPEGINCLUDE = -I$(JPEGDIR)
  35.  
  36.  
  37. # if, for whatever reason, you're unable to get the TIFF library to compile
  38. # on your machine, *COMMENT OUT* the following lines
  39. #
  40. # Also, comment out the LIBJPEG dependancy at the end of this Makefile
  41. #
  42. TIFF = -DHAVE_TIFF
  43. TIFFDIR = tiff
  44. LIBTIFF = $(TIFFDIR)/libtiff.a
  45. TIFFINCLUDE = -I$(TIFFDIR)
  46.  
  47.  
  48. # if, for whatever reason, you're unable to get the PDS/VICAR support
  49. # to compile (xvpds.c, and vdcomp.c), *COMMENT OUT* the following line,
  50. # and also remove 'vdcomp' from the 'all:' dependancy 
  51. PDS = -DHAVE_PDS
  52.  
  53.  
  54. # if, for whatever reason, you don't wish to use the fsQuick software
  55. # (which currently only affects xv's performance on a 1-bit display)
  56. # you should comment out the following line
  57. # (fsQuick.c contains some huge macro definitions which could break your
  58. # C preprocessor...
  59. FSQUICK = -DHAVE_FSQUICK
  60.  
  61.  
  62. # if you are running under DXWM, I pity you.  XV doesn't work correctly
  63. # under DXWM.  You should probably be running MWM.  However, if such is
  64. # not a valid option for you, try uncommenting the following line.  The
  65. # behavior won't be 'right', but it will be less 'wrong'.
  66. #DXWM = -DDXWM
  67.  
  68.  
  69. # if you are running on a SysV-based machine, such as HP, Silicon Graphics,
  70. # etc, uncomment the following line to get you most of the way there.  
  71. #
  72. #UNIX = -DSVR4
  73.  
  74.  
  75. # If you are running on a POSIX-compatible machine, such as an
  76. # IBM RS/6000, you MAY need to uncomment the 'NEED_DIRENT' line.
  77. # To determine if such is the case, do a 'man readdir' on your machine.  If
  78. # readdir() returns a pointer to 'struct direct', you will not have
  79. # to change anything.  If, however, readdir() returns a pointer to
  80. # 'struct dirent', you will have to add the '-DDIRENT' to CFLAGS
  81. #
  82. # One note: folks using an IBM RS/6000 don't have to touch this line.  
  83. #           I check for '6000'-hood in xv.h
  84. #
  85. #NEED_DIRENT = -DDIRENT
  86.  
  87.  
  88. #
  89. # for UMAX V by Encore Computers uncomment the following line for
  90. # the portable c compiler, system specific definitions and
  91. # location of local X11 library(if site specific, modify -L option)
  92. # No other switches should be necessary
  93. #
  94. #UMAX =  -q extensions=pcc_c -D__UMAXV__ -L/usr2/usr/lib/X11 -DSVR4 -DDIRENT
  95.  
  96.  
  97. # If your machine doesn't have the 'strchr', 'memset' and 'memcpy' functions,
  98. # but does have 'bcopy', uncomment the following line.  (And get a better 
  99. # operating system!)
  100. #
  101. #USEMEM = -DNEED_MEMROUTINES
  102.  
  103. # if your machine doesn't have 'random()', but does have 'rand(),
  104. # uncomment the following line:
  105. #
  106. #RAND = -DNO_RANDOM
  107.  
  108. # IF YOUR MACHINE DOESN'T HAVE 'vprintf()' OR 'vsprintf()'
  109. #
  110. # Vax BSD and IBM AOS don't have vprintf or vsprintf.
  111. # Note that our local library versions of sprintf have been updated
  112. # to return int, the number of characters in the formatted string,
  113. # whereas the versions in stock 4.3BSD do not so return.  You may
  114. # have to remove the "-DINTSPRINTF" below if you're compiling for
  115. # stock 4.3BSD or for some other Vax or RT library package where
  116. # sprintf returns char *.
  117. #
  118. # Also, I define NOVOID on the Vax because I'm using pcc to compile.
  119. # If you use gcc or some other better compiler, this should not be
  120. # necessary.  I define NOSTDHDRS on the RT because we don't have
  121. # standard ANSI header files installed for the RT, even though the RT
  122. # compiler claims to be ANSI-compliant.
  123. #
  124. #  (for BSD 4.3 VAX, uncomment the following line)
  125. #VPRINTF = -DNEED_VPRINTF -DINTSPRINTF -DLONGINT -DNOVOID
  126. #  (for (stock) IBM RT AOS 4.3, uncomment the following line)
  127. #VPRINTF = -DNEED_VPRINTF -DLONGINT -DNOSTDHDRS
  128. #  (for Sequent running DYNIX 3.1.4, uncomment the following line)
  129. #VPRINTF = -DNEED_VPRINTF -DLONGINT -DNOSTDHDRS
  130.  
  131.  
  132. # If your machine does not have the 'setitimer()' call, but does
  133. # have the 'usleep()' call, uncomment the following line:
  134. #
  135. #TIMERS = -DUSLEEP
  136. #
  137. # alternately, if your machine does not have EITHER the 'setitimer()' or
  138. # the 'usleep()' call, uncomment the following line:
  139. #
  140. TIMERS = -DNOTIMER
  141.  
  142.  
  143. # If you are using an AT&T machine, uncomment the following line
  144. # If you have problems compiling xv.c and xvdir.c because of the DIR
  145. # reference in dirent.h, append '-DATT' to the following line:
  146. #
  147. #ATT = -DDIRENT -DUSLEEP -DATT
  148.  
  149.  
  150. # If you are using an HP running HPUX 7.0, uncomment the following line
  151. #
  152. #HPUX7 = -DSVR4 -DATT +Ns4000 -DHPUX7
  153.  
  154.  
  155. # For SCO and ODT machines, uncomment the following:
  156. #
  157. #SCO = -Dsco -DPOSIX -DNOTIMER
  158. #
  159. # Itimers will be in 3.2v3 (yeah!) but that won't be out in the public's
  160. # hands for a while.
  161. #
  162. # Also, you'll want to change LIBS to
  163. #
  164. #  -lX11 -lm -lsocket -lmalloc -lc -lx
  165. #
  166. # -lx must be after -lc so you get the right directory routines.
  167. #
  168.  
  169. CFLAGS = $(CCOPTS) $(NEED_DIRENT) $(VPRINTF) $(TIMERS) $(ATT) \
  170.     $(SCO) $(UNIX) $(USEMEM) $(HPUX7) $(JPEG) $(JPEGINCLUDE) \
  171.     $(DXWM) $(UMAX) $(FSQUICK) $(RAND) $(TIFF) $(TIFFINCLUDE) $(PDS)
  172.  
  173. LIBS = $(LIBJPEG) $(LIBTIFF) -lm -lpc -lx -lsys -lxt 
  174.  
  175. BITMAPS = bitmaps/grasp bitmaps/penn bitmaps/down bitmaps/down1 \
  176.       bitmaps/up bitmaps/up1 bitmaps/scrlgray bitmaps/gray50 \
  177.       bitmaps/gray25 bitmaps/i_fifo bitmaps/i_chr bitmaps/i_dir \
  178.       bitmaps/i_blk bitmaps/i_lnk bitmaps/i_sock bitmaps/i_reg \
  179.       bitmaps/rb_off bitmaps/rb_on bitmaps/rb_off1 bitmaps/rb_on1 \
  180.       bitmaps/fc_left bitmaps/fc_leftm bitmaps/fc_mid bitmaps/fc_midm \
  181.       bitmaps/fc_right bitmaps/fc_rightm bitmaps/fc_left1 \
  182.       bitmaps/fc_left1m bitmaps/fc_right1 bitmaps/fc_right1m \
  183.       bitmaps/icon bitmaps/dial_cw1 bitmaps/dial_cw2 bitmaps/dial_ccw1 \
  184.       bitmaps/dial_ccw2 bitmaps/iconmask bitmaps/gf1_addh \
  185.       bitmaps/gf1_delh bitmaps/gf1_line bitmaps/gf1_rst \
  186.       bitmaps/gf1_spln bitmaps/gf1_gamma \
  187.       bitmaps/h_rotl bitmaps/h_rotr bitmaps/h_sinc bitmaps/h_sdec \
  188.       bitmaps/h_flip bitmaps/cb_off bitmaps/cb_on bitmaps/cb_off1 \
  189.       bitmaps/cb_on1 bitmaps/h_sat bitmaps/h_desat bitmaps/root_weave \
  190.           bitmaps/cboard50 bitmaps/mb_chk bitmaps/fliph bitmaps/flipv
  191.  
  192. OBJS =     xv.o xvevent.o xvroot.o xvmisc.o xvimage.o xvcolor.o xvsmooth.o \
  193.     xv24to8.o xvgif.o xvpm.o xvinfo.o xvctrl.o xvscrl.o \
  194.     xvgifwr.o xvdir.o xvbutt.o xvpbm.o xvxbm.o xvgam.o \
  195.     xvdial.o xvgraf.o xvsunras.o xvjpeg.o xvps.o xvpopup.o xvdflt.o \
  196.     xvtiff.o xvtiffwr.o xvpds.o xvrle.o xvgrab.o vprintf.o fsQuick.o 
  197.  
  198. MISC = README CHANGELOG IDEAS
  199.  
  200. .c.o:
  201.         echo $(CCOPTS) $(NEED_DIRENT) $(VPRINTF) $(TIMERS) $(ATT) > barf.ccc
  202.         echo $(SCO) $(UNIX) $(USEMEM) $(HPUX7) $(JPEG) $(JPEGINCLUDE) >> barf.ccc
  203.         echo $(DXWM) $(UMAX) $(FSQUICK) $(RAND) $(TIFF) $(TIFFINCLUDE) $(PDS) >> barf.ccc
  204.         echo -c $*.c -o $@ >> barf.ccc
  205.         $(CC) @barf.ccc
  206.  
  207.  
  208. #all: $(LIBJPEG) $(LIBTIFF) xv bggen vdcomp
  209. all: xv bggen vdcomp
  210.  
  211. #xv: $(OBJS) $(LIBJPEG) $(LIBTIFF)
  212.  
  213. xv.exe: xv
  214.         strip xv
  215.         aout2exe xv
  216.         del xv
  217.  
  218. xv: $(OBJS) xv.lnk
  219.         $(CC) @xv.lnk
  220.  
  221. xv.lnk:
  222.         if exist xv.lnk del xv.lnk
  223.         echo -o xv >> xv.lnk
  224.         echo xv.o xvevent.o xvroot.o xvmisc.o xvimage.o xvcolor.o xvsmooth.o >> xv.lnk
  225.         echo xv24to8.o xvgif.o xvpm.o xvinfo.o xvctrl.o xvscrl.o >> xv.lnk
  226.         echo xvgifwr.o xvdir.o xvbutt.o xvpbm.o xvxbm.o xvgam.o >> xv.lnk
  227.         echo xvdial.o xvgraf.o xvsunras.o xvjpeg.o xvps.o xvpopup.o xvdflt.o >> xv.lnk
  228.         echo xvtiff.o xvtiffwr.o xvpds.o xvrle.o xvgrab.o vprintf.o fsQuick.o >> xv.lnk
  229.         echo $(LIBS) >> xv.lnk
  230.  
  231.  
  232. bggen: bggen.c
  233.     $(CC) $(CFLAGS) -o bggen bggen.c
  234.  
  235. vdcomp: vdcomp.c
  236.     $(CC) $(CFLAGS) -o vdcomp vdcomp.c
  237.     
  238. clean:
  239.     rm -f $(OBJS) xv bggen vdcomp 
  240. # comment out one or both of the following if you aren't using the JPEG and
  241. # TIFF libraries
  242.     ( cd $(JPEGDIR) ; make clean )
  243.     ( cd $(TIFFDIR) ; make clean )
  244.  
  245.  
  246. tar:
  247.     tar cf xv.tar Makefile* Imakefile *.c *.h bitmaps \
  248.         docs unsupt $(JPEGDIR) $(TIFFDIR) $(MISC)
  249.  
  250. $(OBJS):   xv.h
  251. #xv.o:      bitmaps.h
  252. #xvbutt.o:  bitmaps.h
  253. #xvctrl.o:  bitmaps.h
  254. #xvdial.o:  bitmaps.h
  255. #xvinfo.o:  bitmaps.h
  256. #xvmisc.o:  bitmaps.h
  257. #xvscrl.o:  bitmaps.h
  258. #xvgraf.o:  bitmaps.h
  259.  
  260. #xvdflt.o:  bitmaps/xvpic_logo bitmaps/xvpic_rev bitmaps/xvpic_jhb
  261. #xvdflt.o:  bitmaps/xf_left bitmaps/xf_right
  262.  
  263.  
  264. bitmaps.h: $(BITMAPS)
  265.     cat $(BITMAPS) > bitmaps.h
  266.  
  267.  
  268.  
  269.  
  270. # if, for whatever reason, you're unable to get the JPEG library to compile
  271. # on your machine, *COMMENT OUT* the following lines
  272. #
  273. $(LIBJPEG):
  274.         cd $(JPEGDIR)
  275.         make
  276.         cd ..
  277.  
  278. # if, for whatever reason, you're unable to get the TIFF library to compile
  279. # on your machine, *COMMENT OUT* the following lines
  280. #
  281. $(LIBTIFF):
  282.         cd $(TIFFDIR)
  283.         make
  284.         cd ..
  285.  
  286.