# Change defines as needed ...

COMPILER=gcc

CFLAGS=-O

# Path to libraries needed by gd.lib ... might not be necessary depending
# on your installation
PNG=../libpng-1.0.5
ZLIB=../zlib-1.1.3

# Location of the cgi directory of your webserver
INSTALL_CGI=/usr/local/httpd/cgi-bin

# Location of the uncgi.o file
UNCGI_O=uncgi.o

# nothing should have to be changed below here ...

LIBS=-lm -lgd -lpng -lz -lmysqlclient

INCLUDEDIRS=-I/usr/local/include -I/usr/include/X11 -I/usr/X11R6/include/X11
LIBDIRS=-L. -L/usr/local/lib -L/usr/lib/X11 -L/usr/X11R6/lib -L$(PNG) -L$(ZLIB)

CC=$(COMPILER) $(INCLUDEDIRS)
LINK=$(CC) $(LIBDIRS) $(LIBS)

acct-gfx: acct-gfx.o
	$(CC) acct-gfx.o $(UNCGI_O) -o acct-gfx	$(LIBDIRS) $(LIBS)

install: acct-gfx
	cp acct-gfx $(INSTALL_CGI)

clean:
	rm acct-gfx acct-gfx.o

