***************
*** 15,25 ****
    md5c.o util_md5.o explain.o http_bprintf.o util_date.o util_snprintf.o\
    $(MODULES)
  
- .c.o:
- 	$(CC) -c $(INCLUDES) $(CFLAGS) $(SPACER) $<
  
  all: @@Configuration@@ httpd
  
  @@Configuration@@: Configuration.tmpl
  	@echo "@@Configuration@@ older than Configuration.tmpl, or doesn't exist."
  	@echo "Consider copying Configuration.tmpl to @@Configuration@@, editing and rerunning"
--- 15,36 ----
    md5c.o util_md5.o explain.o http_bprintf.o util_date.o util_snprintf.o\
    $(MODULES)
  
+ %.o: %.c
+ 	$(CC) -c $(INCLUDES) $(CFLAGS) -o $@ $<
+ 
+ %.so: %.c
+ 	$(CC) -shared $(LFLAGS) -o $@ $< $(DYNAMIC_CFLAGS) $(CFLAGS)
  
  all: @@Configuration@@ httpd
  
+ modules_install: $(DYNAMODS)
+        mkdir -p ../modules
+        cp $(DYNAMODS) ../modules
+        awk < Configuration \
+  '/^DynamicModule/ { print "LoadModule",$$2,"modules/"$$3 }' \
+        | sed -e 's/\.o/.so/g' > ../conf/dynamic_modules
+ 
+ 
  @@Configuration@@: Configuration.tmpl
  	@echo "@@Configuration@@ older than Configuration.tmpl, or doesn't exist."
  	@echo "Consider copying Configuration.tmpl to @@Configuration@@, editing and rerunning"
***************
*** 38,44 ****
  	$(MAKE) CC=$(CC) AUX_CFLAGS='$(CFLAGS)' RANLIB='$(RANLIB)')
  
  clean:
- 	rm -f httpd $(OBJS) 
  	cd regex; $(MAKE) clean
  	cd modules; $(MAKE) clean
  
--- 49,55 ----
  	$(MAKE) CC=$(CC) AUX_CFLAGS='$(CFLAGS)' RANLIB='$(RANLIB)')
  
  clean:
+ 	rm -f httpd $(OBJS) $(DYNAMODS)
  	cd regex; $(MAKE) clean
  	cd modules; $(MAKE) clean
  
***************
*** 56,61 ****
  #Dependencies
  
  $(OBJS): Makefile
  
  alloc.o: conf.h alloc.h
  buff.o: conf.h alloc.h buff.h
--- 67,73 ----
  #Dependencies
  
  $(OBJS): Makefile
+ $(DYNAMODS): Makefile
  
  alloc.o: conf.h alloc.h
  buff.o: conf.h alloc.h buff.h
***************
*** 114,119 ****
                util_script.h scoreboard.h
  mod_userdir.o: httpd.h http_config.h
  mod_usertrack.o: httpd.h http_config.h http_core.h
  modules.o: httpd.h http_config.h
  rfc1413.o: httpd.h http_log.h rfc1413.h
  util.o: httpd.h http_conf_globals.h
--- 126,132 ----
                util_script.h scoreboard.h
  mod_userdir.o: httpd.h http_config.h
  mod_usertrack.o: httpd.h http_config.h http_core.h
+ mod_dlopen.o: httpd.h http_config.h
  modules.o: httpd.h http_config.h
  rfc1413.o: httpd.h http_log.h rfc1413.h
  util.o: httpd.h http_conf_globals.h
