home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / c / xv221src / imakefil < prev    next >
Encoding:
Text File  |  1992-04-29  |  8.2 KB  |  270 lines

  1. /* if, for whatever reason, you're unable to get the JPEG library to compile
  2.  * on your machine, *COMMENT OUT* the following line
  3.  */
  4. #define HaveJpeg
  5.  
  6.  
  7. /* if, for whatever reason, you're unable to get the TIFF library to compile
  8.  * on your machine, *COMMENT OUT* the following line
  9.  */
  10. #define HaveTiff
  11.  
  12.  
  13. /* if, for whatever reason, you're unable to get the PDS/VICAR support
  14.  * to compile (xvpds.c, and vdcomp.c), *COMMENT OUT* the following line
  15.  */
  16. PDS = -DHAVE_PDS
  17.  
  18.  
  19. /* if, for whatever reason, you don't wish to use the fsQuick software
  20.  * (which currently only affects xv's performance on a 1-bit display)
  21.  * you should comment out the following line
  22.  * (fsQuick.c contains some *huge* macro definitions which might blow up
  23.  * your C preprocessor)
  24.  */
  25. FSQUICK = -DHAVE_FSQUICK
  26.  
  27. /* if you are running under DXWM, I pity you.  XV doesn't work correctly
  28.  * under DXWM.  You should probably be running MWM.  However, if such is
  29.  * not a valid option for you, try uncommenting the following line.  The
  30.  * behavior won't be 'right', but it will be less 'wrong'.
  31.  */
  32. /* DXWM = -DDXWM */
  33.  
  34. /*
  35.  * if you are running on a SysV-based machine, such as HP, Silicon Graphics,
  36.  * etc, uncomment the following line to get you *most* of the way there.
  37.  */
  38. /* UNIX = -DSVR4 */
  39.  
  40. /*
  41.  * If you are running on a POSIX-compatible machine, such as an
  42.  * IBM RS6000, you MAY need uncomment the 'NEED_DIRENT' line.
  43.  * To determine if such is the case, do a 'man readdir' on your machine.  If
  44.  * readdir() returns a pointer to 'struct direct', you will not have
  45.  * to change anything.  If, however, readdir() returns a pointer to
  46.  * 'struct dirent', you will have to add the '-DDIRENT' to CFLAGS
  47.  *
  48.  * One note: folks using an IBM RS/6000 don't have to touch this line.  
  49.  *           I check for '6000'-hood in xv.h
  50.  */
  51. /* NEED_DIRENT = -DDIRENT */
  52.  
  53.  
  54. /* If your machine doesn't have the 'strchr', 'memset' and 'memcpy'
  55.  * functions, but does have 'bcopy', uncomment the following line:
  56.  */
  57. /* USEMEM= -DNEED_MEMROUTINES */
  58.  
  59.  
  60. /* IF YOUR MACHINE DOESN'T HAVE 'vprintf()' OR 'vsprintf()'
  61.  *
  62.  * Vax BSD and IBM AOS don't have vprintf or vsprintf.
  63.  * Note that our local library versions of sprintf have been updated
  64.  * to return int, the number of characters in the formatted string,
  65.  * whereas the versions in stock 4.3BSD do not so return.  You may
  66.  * have to remove the "-DINTSPRINTF" below if you're compiling for
  67.  * stock 4.3BSD or for some other Vax or RT library package where
  68.  * sprintf returns char *.
  69.  *
  70.  * Also, I define NOVOID on the Vax because I'm using pcc to compile.
  71.  * If you use gcc or some other better compiler, this should not be
  72.  * necessary.  I define NOSTDHDRS on the RT because we don't have
  73.  * standard ANSI header files installed for the RT, even though the RT
  74.  * compiler claims to be ANSI-compliant.
  75.  */
  76. #if defined(VaxArchitecture) && !defined(UltrixArchitecture)
  77. VPRINTF=    -DNEED_VPRINTF -DINTSPRINTF -DLONGINT -DNOVOID
  78. #else 
  79. #  if defined(RtArchitecture) && !defined(AIXArchitecture)
  80. VPRINTF=    -DNEED_VPRINTF -DINTSPRINTF -DLONGINT -DNOSTDHDRS
  81. #  else
  82. #    if defined(SequentArchitecture)
  83. VPRINTF= -DNEED_VPRINTF -DLONGINT -DNOSTDHDRS
  84. #    endif
  85. #  endif
  86. #endif
  87.  
  88.  
  89. /* If your machine does not have the 'setitimer()' call, but does
  90.  * have the 'usleep()' call, uncomment the following line:
  91.  */
  92. /* TIMERS = -DUSLEEP */
  93. /*
  94.  * alternately, if your machine does not have EITHER the 'setitimer()' or
  95.  * the 'usleep()' call, uncomment the following line:
  96.  */
  97. /* TIMERS = -DNOTIMER */
  98.  
  99.  
  100. /* If you are using an AT&T machine, uncomment the following line
  101.  * If you have problems compiling xv.c and xvdir.c because of the DIR
  102.  * reference in dirent.h, append '-DATT' to the following line:
  103.  */
  104. /* ATT = -DSVR4 -DDIRENT -DUSLEEP -DATT */
  105.  
  106.  
  107. /* If you are using an HP running HPUX 7.0, uncomment the following line
  108.  */
  109. /* HPUX7 = -DSVR4 -DATT +Ns4000 -DHPUX7 */
  110.  
  111.  
  112. /* for UMAX V by Encore Computers uncomment the following line for
  113.  * the portable c compiler, and system specific definitions.
  114.   * No other switches should be necessary
  115.  */
  116. /* UMAX = -q extensions=pcc_c -D__UMAXV__ -DSVR4 -DDIRENT */
  117.  
  118. /* If your machine doesn't have the 'random()' function, and only
  119.  * has 'rand()', uncomment the following line:
  120.  */
  121. /* RAND= -DNO_RANDOM */
  122.  
  123. /* This should mark the end of the configuration parameters */
  124.  
  125. #ifdef HaveJpeg
  126. JPEG = -DHAVE_JPEG
  127. JPEGDIR = jpeg
  128. LIBJPEG = $(JPEGDIR)/libjpeg.a
  129. JPEGINCLUDE = -I$(JPEGDIR)
  130. #endif
  131.  
  132. #ifdef HaveTiff
  133. TIFF = -DHAVE_TIFF
  134. TIFFDIR = tiff
  135. LIBTIFF = $(TIFFDIR)/libtiff.a
  136. TIFFINCLUDE = -I$(TIFFDIR)
  137. #endif
  138.  
  139. #if defined(SCOArchitecture)
  140. SCO= -DPOSIX -DNOITIMER
  141. SYS_LIBRARIES=        $(XLIB) $(LIBJPEG) $(LIBTIFF) -lm -lc -lx 
  142. #else
  143. SYS_LIBRARIES=        $(XLIB) $(LIBJPEG) $(LIBTIFF) -lm
  144. #endif
  145.  
  146.  
  147. DEFINES= $(SCO) $(UNIX) $(NEED_DIRENT) $(VPRINTF) $(TIMERS) $(ATT) \
  148.     $(USEMEM) $(HPUX7) $(JPEG) $(DXWM) $(UMAX) \
  149.     $(FSQUICK) $(RAND) $(TIFF) $(PDS)
  150.  
  151. INCLUDES = $(JPEGINCLUDE) $(TIFFINCLUDE)
  152.  
  153. BITMAPS = bitmaps/grasp bitmaps/penn bitmaps/down bitmaps/down1 \
  154.       bitmaps/up bitmaps/up1 bitmaps/scrlgray bitmaps/gray50 \
  155.       bitmaps/gray25 bitmaps/i_fifo bitmaps/i_chr bitmaps/i_dir \
  156.       bitmaps/i_blk bitmaps/i_lnk bitmaps/i_sock bitmaps/i_reg \
  157.       bitmaps/rb_off bitmaps/rb_on bitmaps/rb_off1 bitmaps/rb_on1 \
  158.       bitmaps/fc_left bitmaps/fc_leftm bitmaps/fc_mid bitmaps/fc_midm \
  159.       bitmaps/fc_right bitmaps/fc_rightm bitmaps/fc_left1 \
  160.       bitmaps/fc_left1m bitmaps/fc_right1 bitmaps/fc_right1m \
  161.       bitmaps/icon bitmaps/dial_cw1 bitmaps/dial_cw2 bitmaps/dial_ccw1 \
  162.       bitmaps/dial_ccw2 bitmaps/iconmask bitmaps/gf1_addh \
  163.       bitmaps/gf1_delh bitmaps/gf1_line bitmaps/gf1_rst \
  164.       bitmaps/gf1_spln bitmaps/gf1_gamma \
  165.       bitmaps/h_rotl bitmaps/h_rotr bitmaps/h_sinc bitmaps/h_sdec \
  166.       bitmaps/h_flip bitmaps/cb_off bitmaps/cb_on bitmaps/cb_off1 \
  167.       bitmaps/cb_on1 bitmaps/h_sat bitmaps/h_desat bitmaps/root_weave \
  168.           bitmaps/cboard50 bitmaps/mb_chk bitmaps/fliph bitmaps/flipv
  169.  
  170.  
  171. SRCS1 =    xv.c xvevent.c xvroot.c xvmisc.c xvimage.c xvcolor.c xvsmooth.c \
  172.     xv24to8.c xvgif.c xvpm.c xvinfo.c xvctrl.c xvscrl.c \
  173.     xvgifwr.c xvdir.c xvbutt.c xvpbm.c xvxbm.c xvgam.c \
  174.     xvdial.c xvgraf.c xvsunras.c xvjpeg.c xvps.c xvpopup.c xvdflt.c \
  175.     xvtiff.c xvtiffwr.c xvpds.c xvrle.c xvgrab.c vprintf.c fsQuick.c
  176.  
  177. OBJS1 =    xv.o xvevent.o xvroot.o xvmisc.o xvimage.o xvcolor.o xvsmooth.o \
  178.     xv24to8.o xvgif.o xvpm.o xvinfo.o xvctrl.o xvscrl.o \
  179.     xvgifwr.o xvdir.o xvbutt.o xvpbm.o xvxbm.o xvgam.o \
  180.     xvdial.o xvgraf.o xvsunras.o xvjpeg.o xvps.o xvpopup.o xvdflt.o \
  181.     xvtiff.o xvtiffwr.o xvpds.o xvrle.o xvgrab.o vprintf.o fsQuick.o
  182.  
  183. SRCS2=    bggen.c
  184. OBJS2=    bggen.o
  185.  
  186. SRCS3=    vdcomp.c
  187. OBJS3=    vdcomp.o
  188.  
  189. PROGRAMS= xv bggen vdcomp
  190.  
  191. all::
  192.     @echo ""
  193.     @echo "  Did you remember to 'make depend' first?"
  194.     @echo ""
  195.  
  196. #ifdef HaveJpeg
  197. all::    
  198.     @echo "  building libjpeg.a ..."
  199.     @echo ""
  200.     ( cd $(JPEGDIR) ; $(MAKE) CC='$(CC)' libjpeg.a )
  201.     @echo ""
  202. #endif
  203.  
  204. #ifdef HaveTiff
  205. all::    
  206.     @echo "  building libtiff.a ..."
  207.     @echo ""
  208.     ( cd $(TIFFDIR) ; $(MAKE) CC='$(CC)')
  209.     @echo ""
  210. #endif
  211.  
  212. all::
  213.     @echo "  building xv ..."
  214.     @echo ""
  215.  
  216.  
  217. #ifdef HaveJpeg
  218. clean::
  219.     @echo ""
  220.     @echo "  cleaning in $(JPEGDIR) ..."
  221.     @echo ""
  222.     ( cd $(JPEGDIR) ; $(MAKE) clean )
  223.     @echo ""
  224. #endif
  225.  
  226. #ifdef HaveTiff
  227. clean::
  228.     @echo "  cleaning in $(TIFFDIR) ..."
  229.     @echo ""
  230.     ( cd $(TIFFDIR) ; $(MAKE) clean )
  231.     @echo ""
  232. #endif
  233.  
  234.  
  235. /* depend:: bitmaps.h */
  236.  
  237.  
  238. SRCS = $(SRCS1) $(SRCS2) $(SRCS3)
  239. DependTarget()
  240.   
  241. AllTarget($(PROGRAMS))
  242.  
  243. NormalProgramTarget(xv,$(OBJS1),$(DEPLIBS),$(LOCAL_LIBRARIES),$(SYS_LIBRARIES))
  244. NormalProgramTarget(bggen,$(OBJS2),$(DEPLIBS),\
  245.             $(LOCAL_LIBRARIES),$(SYS_LIBRARIES))
  246. NormalProgramTarget(vdcomp,$(OBJS3),$(DEPLIBS),\
  247.             $(LOCAL_LIBRARIES),$(SYS_LIBRARIES))
  248.  
  249.  
  250. InstallProgram(xv,$(BINDIR))
  251. InstallProgram(bggen,$(BINDIR))
  252. InstallProgram(vdcomp,$(BINDIR))
  253.  
  254. InstallManPageLong(docs/xv,$(MANDIR),xv)
  255. InstallManPageLong(docs/bggen,$(MANDIR),bggen)
  256.  
  257. /* ComplexProgramTarget_1(xv,,)
  258.  * ComplexProgramTarget_2(bggen,,)
  259.  * ComplexProgramTarget_3(vdcomp,,)
  260.  * 
  261.  * InstallManPage(docs/xv,$(MANDIR))
  262.  * InstallManPage(docs/bggen,$(MANDIR))
  263.  */
  264.  
  265. tar:
  266.     tar cf xv.tar Makefile *.c *.h bitmaps docs $(MISC)
  267.  
  268. bitmaps.h: $(BITMAPS)
  269.     cat $(BITMAPS) > bitmaps.h
  270.