Home | History | Annotate | Download | only in preader
      1 # Makefile for PngMinus (rpng2)
      2 # Linux / Unix
      3 
      4 #CC=cc
      5 CC=gcc
      6 LD=$(CC)
      7 
      8 RM=rm -f
      9 
     10 #XINC = -I/usr/include			# old-style, stock X distributions
     11 #XLIB = -L/usr/lib/X11 -lX11		#  (including SGI IRIX)
     12 
     13 #XINC = -I/usr/openwin/include		# Sun workstations (OpenWindows)
     14 #XLIB = -L/usr/openwin/lib -lX11
     15 
     16 XINC = -I/usr/X11R6/include		# new X distributions (X.org, etc.)
     17 XLIB = -L/usr/X11R6/lib -lX11
     18 #XLIB = -L/usr/X11R6/lib64 -lX11	# e.g., Red Hat on AMD64
     19 
     20 #XINC = -I/usr/local/include   		# FreeBSD
     21 #XLIB = -L/usr/local/lib -lX11
     22 
     23 #LIBS = $(XLIB)
     24 LIBS = $(XLIB) -lm                      #platforms that need libm
     25 
     26 CFLAGS=-DPNG_USER_CONFIG -DNO_GZCOMPRESS -DNO_GZIP \
     27        -DdeflateParams\(a,b,c\)=Z_OK -I. $(XINC) -O1
     28 
     29 C=.c
     30 O=.o
     31 L=.a
     32 E=
     33 
     34 ZOBJS  = adler32$(O) crc32$(O) \
     35 	 infback$(O) inffast$(O) inflate$(O) inftrees$(O) \
     36 	 trees$(O) uncompr$(O) zutil$(O)
     37 
     38 OBJS  = rpng2-x$(O) readpng2$(O) png$(O) pngerror$(O) pngget$(O) pngmem$(O) \
     39 	pngpread$(O) pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) \
     40 	pngset$(O) pngtrans$(O)  $(ZOBJS)
     41 
     42 # implicit make rules -------------------------------------------------------
     43 
     44 .c$(O): png.h pngconf.h readpng2.h pngusr.h zlib.h
     45 	$(CC) -c $(CFLAGS) $<
     46 
     47 # dependencies
     48 
     49 all: rpng2-x$(E)
     50 
     51 rpng2-x$(E): $(OBJS)
     52 	$(LD) -o rpng2-x$(E) $(OBJS) $(LIBS)
     53 	strip rpng2-x$(E)
     54 
     55 clean:
     56 	$(RM) rpng2-x$(O)
     57 	$(RM) rpng2-x$(E)
     58 	$(RM) $(OBJS)
     59 
     60 # End of makefile for rpng2-x
     61