# httpproxy and related tools
#
# copyright 1995-96 Matthias Hopf
#
# All rights reserved.
#


# All objects
HTTPPROXY_O   = httpproxy.o logging.o service.o net_amitcp.o net_as225.o
HTTPDELETE_O  = httpdelete.o
HTTPFETCH_O   = httpfetch.o net_amitcp.o net_as225.o


# Front end
test:
	@smake "CFLAGS=cpu=000 noopt stackcheck" all

debug:
	@smake -u "CFLAGS=cpu=000 noopt noerrrexx stackcheck define DEBUG=1" all

ndb:
	@smake -u "CFLAGS=cpu=000 noopt noerrrexx" all

ndb000:
	@smake -u "CFLAGS=cpu=000 opt noerrrexx" all

ndb020:
	@smake -u "CFLAGS=cpu=020 opt noerrrexx" all

all: httpproxy httpdelete httpfetch


# Special: clean
clean:
	delete \#?.o \#?.lnk

# Special: check in
ci:
	-ci -l \#?.c \#?.h
	-ci -l httpproxy.guide proxy_history.html Install.guide
	-ci -l Install \#?.rexx

# Special: make lha archive
lha:
	execute makelha

small:
	execute makelha SMALL

# Standard files

# Linking step
httpproxy: $(HTTPPROXY_O)
   sc link to $@ $(HTTPPROXY_O)

httpdelete: $(HTTPDELETE_O)
   sc link to $@ $(HTTPDELETE_O)

httpfetch: $(HTTPFETCH_O)
   sc link to $@ $(HTTPFETCH_O)

# Spezial rules
net_amitcp.o:
   $(CC) $(CFLAGS) $< idir netinclude: gst include:allnet.gst

net_as225.o:
   $(CC) $(CFLAGS) $< idir netinc: nogst


# Dependencies
httpproxy.o:  httpproxy.c httpproxy.h logging.h httpproxy_rev.h net.h
logging.o:    logging.c httpproxy.h
service.o:    service.c httpproxy.h
httpdelete.o: httpdelete.c
httpfetch.o:  httpfetch.c net.h
net_amitcp.o: net_amitcp.c httpproxy.h net.h
net_as225.o:  net_as225.c httpproxy.h net.h

