## ## Apache 1.3 Makefile template for mod_ruby module ## [src/modules/ruby/Makefile.tmpl] ## # the parametrized target LIB=libmod_ruby.$(LIBEXT) # objects for building the static library # # Note: this Makefile can't do it... it is built externally by the mod_ruby # build/install process. OBJS= OBJS_LIB= # objects for building the shared library (convert the static into shared) SHLIB_OBJS=ruby_shared_stub.o SHLIB_OBJS_LIB=libruby.a # standard targets all: lib lib: $(LIB) # not needed #libruby.a: $(OBJS) $(OBJS_LIB) # cp $(OBJS_LIB) $@ # ar r $@ $(OBJS) # $(RANLIB) $@ mod_ruby.so: $(SHLIB_OBJS) $(SHLIB_OBJS_LIB) rm -f $@ $(LD_SHLIB) $(LDFLAGS_SHLIB) -o $@ $(SHLIB_OBJS) $(SHLIB_OBJS_LIB) $(LIBS) clean: rm -f $(OBJS) $(SHLIB_OBJS) $(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 .SUFFIXES: .o .c.o: $(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@ #Dependencies $(OBJS) $(SHLIB_OBJS) $(LIB): Makefile # DO NOT REMOVE