]> code.citadel.org Git - citadel.git/blobdiff - citadel/Makefile
More tweaking to cleanly support bin and run directories.
[citadel.git] / citadel / Makefile
index fa46fa7eaef99102921d6ceb347ffe4f6205d8b2..ab939b439488b11b7ed208ec104021dc17e8cefe 100644 (file)
@@ -17,7 +17,8 @@
 # config.mk is generated by ./configure
 include config.mk
 
-all: citserver setup ctdlmigrate sendcommand
+all := citserver setup ctdlmigrate sendcommand citmail chkpw chkpwd
+all: $(all)
 
 citserver: server/*.c server/modules/*/*.c config.mk server/*.h
        cc ${CFLAGS} \
@@ -34,13 +35,29 @@ ctdlmigrate: utils/ctdlmigrate.c server/citadel_dirs.c utils/*.h server/*.h
 sendcommand: utils/sendcommand.c server/citadel_dirs.c utils/*.h server/*.h
        cc ${CFLAGS} utils/sendcommand.c -lcitadel -o sendcommand
 
+citmail: utils/citmail.c server/citadel_dirs.c utils/*.h server/*.h
+       cc ${CFLAGS} utils/citmail.c -lcitadel -o citmail
+
+chkpw: utils/chkpw.c utils/*.h server/*.h
+       cc ${CFLAGS} utils/chkpw.c -o chkpw
+
+chkpwd: utils/chkpwd.c utils/auth.c utils/*.h server/*.h
+       cc ${CFLAGS} utils/chkpwd.c utils/auth.c -lcrypt -o chkpwd
+
 config.mk: configure
        ./configure
 
 clean:
-       rm -vf citserver
+       rm -vf $(all)
        find . -name *.o | xargs rm -vf
-       rm -vf config.mk
 
-# In conf-IG-ure, "distclean" is the same as "clean"
 distclean: clean
+       rm -vf config.mk
+
+install: $(all) utils/*.sh
+       #
+       # Installing to ${CTDLDIR}
+       #
+       @for x in $(all) utils/*.sh ; do \
+               install -v -C -D -t ${CTDLDIR} $$x ;\
+       done