# # dotGNU Project # # Makefile for dgee apache module # # This software comes with ABSOLUTELY NO WARRANTY. This is free software, # and you are welcome to modify and redistribute it under the GPL licence. # # $Id: Makefile.am,v 1.1.2.1 2003/08/31 10:56:36 ajmitch Exp $ # INC = . $(PXLBASE)/include $(GWBASE)/include/goldwater ../dglib ALLINC = $(addprefix -I,$(INC)) LFLAG = -L$(PXLBASE)/lib -L$(GWBASE)/lib -lgwtx -lpxtra -lpxtra $(LOCAL_LDFLAGS) APACHE2_DIR := $(shell $(APXS2) -q LIBEXECDIR) MOD_DGEE2 = mod_dgee2.so MOD_DGEE2_CONF = mod_dgee2.conf MOD_DGEE2_DIR = $(DESTDIR)$(APACHE_DIR) edit = sed \ -e 's,$${prefix},$(prefix),g' .PHONY: all fresh clean install install-mod install-mod-conf all: $(MOD_DGEE2) fresh: clean all $(MOD_DGEE2): mod_dgee2.c replace $(APXS2) -DEAPI -DDOTGNUVERSION="'\""$(DOTGNUVERSION)"\"'" -DDGVERSION="'\""$(DGVERSION)"\"'" $(ALLINC) -c mod_dgee2.c $(LFLAG) @( if [ ! -e "$(MOD_DGEE2)" ] ; \ then \ echo Info: ERROR $(MOD_DGEE2) not created... ;\ echo Info: If this compile fails because apxs cannot be found, then ;\ echo Info: reconfigure DGEE with --with-apxs=directory where apache apxs;\ echo Info: may be found. If you don\'t have apxs installed, then you may;\ echo Info: be able to use the mod_dgee2.so in the ./precompiled directory.;\ echo Info: Do \"cp apache/precompiled/mod_dgee2.so apache\" before doing;\ echo Info: the install if this is the case. ;\ fi ) replace: $(edit) mod_dgee2.conf > mod_dgee2.conf.tmp mv mod_dgee2.conf.tmp mod_dgee2.conf clean: rm -f *.o rm -f $(MOD_DGEE2) distclean: clean rm -f Makefile rm -f $(MOD_DGEE2_CONF) rm -f *~ rm -f \#* install: install-mod # @../mkinstalldirs $(pkglibdir) # if [ -e $(MOD_DGEE2) ] ; \ # then \ # $(INSTALL) $(MOD_DGEE2) $(DESTDIR)$(pkglibdir) ; \ # else \ # $(INSTALL) precompiled/$(MOD_DGEE2) $(DESTDIR)$(pkglibdir) ; \ # fi install-mod-conf: if [ -e $(MOD_DGEE2) ] ; \ then \ $(INSTALL) $(MOD_DGEE2_CONF) $(DESTDIR)$(sysconfdir) ; \ fi install-mod: $(MOD_DGEE2) install-mod-conf $(APXS2) -i -S LIBEXECDIR=$(MOD_DGEE2_DIR) -a $< directories: