+include ../build.mk
+include build.mk
-CSDIRS=database chancmds usercmds authcmds
+CSDIRS=database chancmds usercmds authcmds authtracker newsearch
+CLEANDIRS=chancmds usercmds authcmds
-.PHONY: all dirs clean
-all: chanserv.so chanserv_protect.so chanserv_grep.so chanserv_chansearch.so chanserv_authlib.so dirs
+.PHONY: all dirs $(CSDIRS) clean distclean
+all: chanserv.so chanserv_protect.so chanserv_grep.so chanserv_relay.so chanserv_flags.so chanserv_cleanupdb.so dirs
-dirs:
- for i in $(CSDIRS) ; do $(MAKE) -C $$i all ; done
+dirs: $(CSDIRS)
ln -sf */*.so .
+$(CSDIRS):
+ cd $@ && $(MAKE) $(MFLAGS) all
+
clean:
- rm -f */*.o */*.so
+ rm -f */*.o */*.so *.o *.so
+ rm -rf */.deps .deps
+ for i in $(CLEANDIRS) ; do $(MAKE) -C $$i $(MFLAGS) clean ; done
+
+distclean:
+ rm -f */.autobuild.mk .autobuild.mk
chanserv.so: chanservdb_updates.o chanserv.o chanservuser.o chanservnetevents.o chanservprivs.o chanservlog.o chanservstdcmds.o \
- chanservdump.o chanservschedule.o
- ld -shared -Bdynamic ${LIBPGSQL} -o $@ $^
+ chanservdump.o chanservschedule.o chanservcrypto.o authlib.o q9snprintf.o
chanserv_protect.so: chanserv_protect.o
- ld -shared -Bdynamic -o $@ $^
-chanserv_grep.so: chanservgrep.o
- ld -shared -Bdynamic ${LIBPCRE} -o $@ $^
+chanserv_grep.so: chanserv_grep.o
-chanserv_chansearch.so: chanserv-chansearch.o
- ld -shared -Bdynamic -o $@ $^
+chanserv_relay.so: chanserv_relay.o
-chanserv_authlib.so: authlib.o
- ld -shared -Bdynamic -o $@ $^
+chanserv_flags.so: chanserv_flags.o
+chanserv_cleanupdb.so: chanserv_cleanupdb.o