53 lines
877 B
Plaintext
53 lines
877 B
Plaintext
|
# Makefile for PngMinus (png2pnm and pnm2png)
|
||
|
# Linux / Unix
|
||
|
|
||
|
CC=cc -O
|
||
|
LD=cc -O
|
||
|
#CC=gcc -O
|
||
|
#LD=gcc -O
|
||
|
LB=ar
|
||
|
RM=rm
|
||
|
CP=cp
|
||
|
|
||
|
PNGPATH = /usr/local
|
||
|
PNGINC = -I$(PNGPATH)/include
|
||
|
#PNGLIB = -L$(PNGPATH)/lib -lpng
|
||
|
PNGLIB = $(PNGPATH)/lib/libpng.a
|
||
|
|
||
|
ZPATH = /usr/local
|
||
|
ZINC = -I$(ZPATH)/include
|
||
|
#ZLIB = -L$(ZPATH)/lib -lz
|
||
|
ZLIB = $(ZPATH)/lib/libz.a
|
||
|
|
||
|
CCFLAGS=-I$(PNGINC) -I$(ZINC)
|
||
|
LDFLAGS=-L$(PNGLIB) -L$(ZLIB)
|
||
|
C=.c
|
||
|
O=.o
|
||
|
L=.a
|
||
|
E=
|
||
|
|
||
|
# dependencies
|
||
|
|
||
|
all: png2pnm$(E) pnm2png$(E)
|
||
|
|
||
|
png2pnm$(O): png2pnm$(C)
|
||
|
$(CC) -c $(CCFLAGS) png2pnm$(C)
|
||
|
|
||
|
png2pnm$(E): png2pnm$(O)
|
||
|
$(LD) -o png2pnm$(E) png2pnm$(O) $(LDFLAGS) -lpng -lz -lm
|
||
|
|
||
|
pnm2png$(O): pnm2png$(C)
|
||
|
$(CC) -c $(CCFLAGS) pnm2png$(C)
|
||
|
|
||
|
pnm2png$(E): pnm2png$(O)
|
||
|
$(LD) -o pnm2png$(E) pnm2png$(O) $(LDFLAGS) -lpng -lz -lm
|
||
|
|
||
|
clean:
|
||
|
$(RM) png2pnm$(O)
|
||
|
$(RM) pnm2png$(O)
|
||
|
$(RM) png2pnm$(E)
|
||
|
$(RM) pnm2png$(E)
|
||
|
|
||
|
# End of makefile for png2pnm / pnm2png
|
||
|
|