##
##  Apache Makefile, automatically generated by Configure script.
##  Hand-edited changes will be lost if the Configure script is re-run.
##  Sources: - ../../Makefile.config (via Configuration.apaci)
##           - ./Makefile.tmpl
##

##
##  Inherited Makefile options from Configure script
##  (Begin of automatically generated section)
##
SRCDIR=../..
EXTRA_CFLAGS=`$(SRCDIR)/apaci`
EXTRA_LDFLAGS=-s
EXTRA_LIBS=-lgdbm
EXTRA_INCLUDES=
EXTRA_DEPS=
OPTIM=-O2
OSDIR=$(SRCDIR)/os/os2
INCDIR=$(SRCDIR)/include
INCLUDES0=-I$(OSDIR) -I$(INCDIR)
SHELL=sh
OS=EMX OS/2
CC=gcc
CPP=gcc -E
TARGET=httpd
CFLAGS_SHLIB= -DSHARED_MODULE -lsocket 
LD_SHLIB=gcc
LDFLAGS_SHLIB= -Zmtd -Zsysv-signals -Zbin-files -Zdll
LDFLAGS_SHLIB_EXPORT=
LDFLAGS_MOD_SHLIB= -Zmtd -Zsysv-signals -Zbin-files -Zdll
LD_SHCORE_DEF=ApacheCoreOS2.def
LD_SHCORE_LIBS= -lsocket -lufc -lbsd
SHARED_CORE_EP=
SHCORE_IMPLIB=ApacheCoreOS2.a
CFLAGS1= -DOS2 -DTCPIPV4 -g -Zmt -DUSE_HSREGEX -DUSE_EXPAT -I$(SRCDIR)/lib/expat-lite  -DSHARED_CORE -DEAPI
INCLUDES1=
LIBS_SHLIB=$(SRCDIR)/ApacheCoreOS2.a -lsocket -lbsd $(EXTRA_LIBS)
LDFLAGS1= -Zexe -Zmtd -Zsysv-signals -Zbin-files
MFLAGS_STATIC=--no-print-directory
REGLIB=regex/libregex.a
EXPATLIB=lib/expat-lite/libexpat.a
RANLIB=true
LIBS1=  -lsocket -lufc -lbsd
##
##  (End of automatically generated section)
##

##
##  Default Makefile options from Configure script
##  (Begin of automatically generated section)
##
CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS)
LIBS=$(EXTRA_LIBS) $(LIBS1)
INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
INCDIR=$(SRCDIR)/include
LIBEXT=dll
include Makefile.OS2
##
##  (End of automatically generated section)
##

LIB=mod_thro.$(LIBEXT)

OBJS=\
     mod_thro.o
OBJS_PIC=\
     mod_thro.lo \

all: lib

lib: $(LIB)

mod_thro.a: $(OBJS)
	rm -f $@
	ar cr $@ $(OBJS)
	$(RANLIB) $@

mod_thro.so: $(OBJS_PIC)
	rm -f $@
	$(LD_SHLIB) $(LDFLAGS_SHLIB) -o $@ $(OBJS_PIC) $(LIBS_SHLIB)

mod_thro.dll: $(OBJS_PIC) mod_thro.def
	$(LD_SHLIB) $(LDFLAGS_SHLIB) -o $* $(OBJS_PIC) $(LIBS_SHLIB)
	emxbind -b -q -s -h0 -dmod_thro.def $* && \
	rm $*

.SUFFIXES: .o .lo .dll

.c.o:
	$(CC) -c $(INCLUDES) $(CFLAGS) $<

.c.lo:
	$(CC) -c $(INCLUDES) $(CFLAGS) $(CFLAGS_SHLIB) $< && mv $*.o $*.lo

clean:
	rm -f $(OBJS) $(OBJS_PIC) $(LIB)

distclean: clean
	-rm -f Makefile

# We really don't expect end users to use this rule.  It works only with
# gcc, and rebuilds Makefile.tmpl.  You have to re-run Configure after
# using it.
depend:
	cp Makefile.tmpl Makefile.tmpl.bak \
	    && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.tmpl > Makefile.new \
	    && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
	    && sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
	           -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
		> Makefile.tmpl \
	    && rm Makefile.new

#Dependencies

$(OBJS) $(OBJS_PIC): Makefile

# DO NOT REMOVE
mod_thro.o: mod_thro.c mod_thro.h $(INCDIR)/httpd.h \
 $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \
 $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
 $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h \
 $(INCDIR)/ap_alloc.h $(INCDIR)/buff.h $(INCDIR)/ap.h \
 $(INCDIR)/util_uri.h $(INCDIR)/http_config.h \
 $(INCDIR)/http_protocol.h $(INCDIR)/explain.h \
 $(INCDIR)/http_log.h $(INCDIR)/http_vhost.h \
 $(INCDIR)/http_request.h \
 $(INCDIR)/httpd.h \
 $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \
 $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
 $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h \
 $(INCDIR)/ap_alloc.h $(INCDIR)/buff.h $(INCDIR)/ap.h \
 $(INCDIR)/util_uri.h $(INCDIR)/http_config.h \
 $(INCDIR)/http_protocol.h $(INCDIR)/explain.h \
 $(INCDIR)/http_log.h $(INCDIR)/http_main.h \
 $(INCDIR)/util_date.h $(INCDIR)/multithread.h \
 $(INCDIR)/ap_md5.h \
 $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \
 $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
 $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h \
 $(INCDIR)/ap_alloc.h $(INCDIR)/buff.h $(INCDIR)/ap.h \
 $(INCDIR)/util_uri.h $(INCDIR)/http_config.h \
 $(INCDIR)/http_protocol.h $(INCDIR)/explain.h \
 $(INCDIR)/http_log.h $(INCDIR)/http_main.h \
 $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \
 $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
 $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h \
 $(INCDIR)/ap_alloc.h $(INCDIR)/buff.h $(INCDIR)/ap.h \
 $(INCDIR)/util_uri.h $(INCDIR)/http_config.h \
 $(INCDIR)/http_protocol.h $(INCDIR)/explain.h \
 $(INCDIR)/http_main.h $(INCDIR)/http_log.h \
 $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \
 $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
 $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h \
 $(INCDIR)/ap_alloc.h $(INCDIR)/buff.h $(INCDIR)/ap.h \
 $(INCDIR)/util_uri.h $(INCDIR)/http_config.h \
 $(INCDIR)/http_protocol.h $(INCDIR)/explain.h \
 $(INCDIR)/http_log.h $(INCDIR)/http_main.h \
 $(INCDIR)/http_core.h $(INCDIR)/util_date.h \
 $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \
 $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
 $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h \
 $(INCDIR)/ap_alloc.h $(INCDIR)/buff.h $(INCDIR)/ap.h \
 $(INCDIR)/util_uri.h $(INCDIR)/http_config.h \
 $(INCDIR)/http_protocol.h $(INCDIR)/explain.h \
 $(INCDIR)/http_main.h $(INCDIR)/ap_md5.h \
 $(INCDIR)/multithread.h $(INCDIR)/http_log.h \
 $(INCDIR)/util_date.h
