1 # Makefile for PngMinus (png2pnm and pnm2png) 2 # Linux / Unix 3 4 #CC=cc 5 CC=gcc 6 LD=$(CC) 7 8 RM=rm -f 9 10 #PNGPATH = /usr/local 11 #PNGINC = -I$(PNGPATH)/include/libpng12 12 #PNGLIB = -L$(PNGPATH)/lib -lpng12 13 #PNGLIBS = $(PNGPATH)/lib/libpng12.a 14 PNGINC = -I../.. 15 PNGLIB = -L../.. -lpng 16 PNGLIBS = ../../libpng.a 17 18 #ZPATH = /usr/local 19 #ZINC = -I$(ZPATH)/include 20 #ZLIB = -L$(ZPATH)/lib -lz 21 #ZLIBS = $(ZPATH)/lib/libz.a 22 ZINC = -I../../../zlib 23 ZLIB = -L../../../zlib -lz 24 ZLIBS = ../../../zlib/libz.a 25 26 CFLAGS=-O3 $(PNGINC) $(ZINC) 27 LDFLAGS=$(PNGLIB) $(ZLIB) 28 LDFLAGSS=$(PNGLIBS) $(ZLIBS) 29 C=.c 30 O=.o 31 L=.a 32 E= 33 34 # dependencies 35 36 #all: png2pnm$(E) pnm2png$(E) 37 all: png2pnm$(E) pnm2png$(E) png2pnm-static$(E) pnm2png-static$(E) 38 39 png2pnm$(O): png2pnm$(C) 40 $(CC) -c $(CFLAGS) png2pnm$(C) 41 42 png2pnm$(E): png2pnm$(O) 43 $(LD) -o png2pnm$(E) png2pnm$(O) $(LDFLAGS) -lm 44 45 png2pnm-static$(E): png2pnm$(O) 46 $(LD) -o png2pnm-static$(E) png2pnm$(O) $(LDFLAGSS) -lm 47 48 pnm2png$(O): pnm2png$(C) 49 $(CC) -c $(CFLAGS) pnm2png$(C) 50 51 pnm2png$(E): pnm2png$(O) 52 $(LD) -o pnm2png$(E) pnm2png$(O) $(LDFLAGS) -lm 53 54 pnm2png-static$(E): pnm2png$(O) 55 $(LD) -o pnm2png-static$(E) pnm2png$(O) $(LDFLAGSS) -lm 56 57 clean: 58 $(RM) png2pnm$(O) 59 $(RM) pnm2png$(O) 60 $(RM) png2pnm$(E) 61 $(RM) pnm2png$(E) 62 $(RM) png2pnm-static$(E) 63 $(RM) pnm2png-static$(E) 64 65 # End of makefile for png2pnm / pnm2png 66