1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
##
## 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
|