• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Makefile for PngMinus (rpng2)
2# Linux / Unix
3
4#CC=cc
5CC=gcc
6LD=$(CC)
7
8RM=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
16XINC = -I/usr/X11R6/include		# new X distributions (X.org, etc.)
17XLIB = -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)
24LIBS = $(XLIB) -lm                      #platforms that need libm
25
26CFLAGS=-DPNG_USER_CONFIG -DNO_GZCOMPRESS -DNO_GZIP \
27       -DdeflateParams\(a,b,c\)=Z_OK -I. $(XINC) -O1
28
29C=.c
30O=.o
31L=.a
32E=
33
34ZOBJS  = adler32$(O) crc32$(O) \
35	 infback$(O) inffast$(O) inflate$(O) inftrees$(O) \
36	 trees$(O) uncompr$(O) zutil$(O)
37
38OBJS  = 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
49all: rpng2-x$(E)
50
51rpng2-x$(E): $(OBJS)
52	$(LD) -o rpng2-x$(E) $(OBJS) $(LIBS)
53	strip rpng2-x$(E)
54
55clean:
56	$(RM) rpng2-x$(O)
57	$(RM) rpng2-x$(E)
58	$(RM) $(OBJS)
59
60# End of makefile for rpng2-x
61