LIB=libwebkeep.a OBJS=mod_webkeep.o mod_webkeep2.o OBJS_PIC=mod_webkeep.lo mod_webkeep2.lo EXTRA_INCLUDES=-I/usr/local/src/perforce/r00.1/p4api all: lib lib: $(LIB) libwebkeep.a: $(OBJS) rm -f $@ ar cr $@ $(OBJS) $(RANLIB) $@ libwebkeep.so: $(OBJS_PIC) rm -f $@ $(LD_SHLIB) $(LDFLAGS_SHLIB) -o $@ $(OBJS_PIC) $(LIBS_SHLIB) .SUFFIXES: .o .lo .c.o: $(CC) -c $(INCLUDES) $(CFLAGS) $< .c.lo: $(CC) -c $(INCLUDES) $(CFLAGS) $(CFLAGS_SHLIB) $< && mv $*.o $*.lo .cc.o: $(CXX) -c $(INCLUDES) $(CFLAGS) $< .cc.lo: $(CXX) -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