# Makefile for libgd is in -*- Text -*- mode for Emacs editing ease.
# Depending on your system, you will need to modify this makefile.
# 
# If you do not have gcc, change the setting for CC, but you must
# use an ANSI standard C compiler (NOT the old SunOS 4.1.3 cc
# compiler; get gcc if you are still using it). 
# 
# If the ar command fails on your system, consult the ar manpage
# for your system. 

CC=gcc 
AR=ar
CP=cp
CFLAGS=-O2
LIBS=-L./ -lgd -lm
bindir=/www/bin

PROGS = abut mkbg mktrans gifq recolor thumbnail composite

all: libgd.a $(PROGS) #gddemo giftogd webgif

makebar: makebar.o
	$(CC) -o makebar makebar.o $(LIBS)

mkblank: mkblank.o
	$(CC) -o mkblank mkblank.o $(LIBS)

coloring-book: coloring-book.o
	$(CC) -o coloring-book coloring-book.o $(LIBS)

composite: composite.o
	$(CC) -o composite composite.o $(LIBS)

abut: abut.o
	$(CC) -o abut abut.o $(LIBS)

recolor: recolor.o
	$(CC) -o recolor recolor.o $(LIBS)

thumbnail: thumbnail.o
	$(CC) -o thumbnail thumbnail.o $(LIBS)

mktrans: mktrans.o
	$(CC) -o mktrans mktrans.o $(LIBS)

mkbg: mkbg.o
	$(CC) -o mkbg mkbg.o $(LIBS)

gifq: gifq.o
	$(CC) -o gifq gifq.o $(LIBS)

makeicon: makeicon.o
	$(CC) -o makeicon makeicon.o $(LIBS)

gddemo: gddemo.o libgd.a gd.h gdfonts.h gdfontl.h
	$(CC) gddemo.o -o gddemo	$(LIBS)

giftogd: giftogd.o libgd.a gd.h
	$(CC) giftogd.o -o giftogd	$(LIBS) 

libgd.a: gd.o gdfontt.o gdfonts.o gdfontmb.o gdfontl.o gdfontg.o \
	gd.h gdfontt.h gdfonts.h gdfontmb.h gdfontl.h gdfontg.h
	rm -f libgd.a
	$(AR) rc libgd.a gd.o gdfontt.o gdfonts.o gdfontmb.o \
		gdfontl.o gdfontg.o

webgif: webgif.o libgd.a gd.h
	$(CC) webgif.o -o webgif	$(LIBS)

install: $(PROGS)
	$(CP) $(PROGS) $(bindir)

clean:
	rm -f *.o *.a gddemo giftogd $(PROGS)

