# Makefile for ick-proxy under Unix.
#
# This file was created by `mkfiles.pl' from the `Recipe' file.
# DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead.

# You can define this path to point at your tools if you need to
# TOOLPATH = /opt/gcc/bin
CC = $(TOOLPATH)cc

CFLAGS = -O2 -Wall -Werror -g -I./
XLDFLAGS =#
ULDFLAGS =#
INSTALL=install
INSTALL_PROGRAM=$(INSTALL)
INSTALL_DATA=$(INSTALL)
prefix=/usr/local
exec_prefix=$(prefix)
bindir=$(exec_prefix)/bin
gamesdir=$(exec_prefix)/games
mandir=$(prefix)/man
man1dir=$(mandir)/man1

all: ick-proxy

ick-proxy: icklang.o malloc.o proxy.o tree234.o unix.o uxcommon.o
	$(CC) $(ULDFLAGS) -o $@ icklang.o malloc.o proxy.o tree234.o unix.o \
		uxcommon.o -lX11

icklang.o: ./icklang.c ./icklang.h ./misc.h
	$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
malloc.o: ./malloc.c ./misc.h ./proxy.h
	$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
osx.o: ./osx.m ./unix.h
	$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
proxy.o: ./proxy.c ./icklang.h ./proxy.h ./misc.h ./tree234.h
	$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
tree234.o: ./tree234.c ./tree234.h ./misc.h
	$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
unix.o: ./unix.c ./misc.h ./proxy.h ./tree234.h ./unix.h
	$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
unix1.o: ./unix.c ./misc.h ./proxy.h ./tree234.h ./unix.h
	$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DNO_X11 -c $< -o $@
uxcommon.o: ./uxcommon.c ./misc.h ./proxy.h ./tree234.h
	$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
wintray.o: ./wintray.c ./tree234.h ./proxy.h ./misc.h
	$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@

doc: ick-proxy.1 unixdoc.html guidoc.html
ick-proxy.1: manpage0.but icklang.but manpage1.but
	halibut --man=ick-proxy.1 manpage0.but icklang.but manpage1.but
unixdoc.html: manpage0.but icklang.but manpage1.but
	halibut --html=unixdoc.html manpage0.but icklang.but manpage1.but
guidoc.html: gui0.but icklang.but gui1.but
	halibut --html=guidoc.html gui0.but icklang.but gui1.but
install: ick-proxy ick-proxy.1
	-mkdir -p $(bindir)
	$(INSTALL_PROGRAM) ick-proxy $(bindir)/ick-proxy
	-mkdir -p $(man1dir)
	$(INSTALL_DATA) ick-proxy.1 $(man1dir)/ick-proxy.1

clean:
	rm -f *.o ick-proxy
