Move the code for the select command to its own file.
[adu.git] / Makefile
index 674ff307ba8636864bd861961d8e3c1999bdf8bf..68e6443515d6b9a682b39153f367105c9b4f3194 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-objects := osl.o fd.o rbtree.o string.o adu.o sha1.o
+objects := adu.o string.o cmdline.o fd.o select.o
 all: adu
 
 DEBUG_CPPFLAGS += -Wno-sign-compare -g -Wunused -Wundef -W
@@ -19,7 +19,14 @@ Makefile.deps: $(wildcard *.c *.h)
 -include Makefile.deps
 
 adu: $(objects)
-       $(CC) -o $@ $(objects) -lcrypto
+       $(CC) -o $@ $(objects) -lcrypto -losl
+
+cmdline.o: cmdline.c cmdline.h
+       $(CC) -c $(CPPFLAGS) $<
+
+cmdline.c cmdline.h: adu.ggo
+       gengetopt --conf-parser < $<
+
 
 %.o: %.c Makefile
        $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) $<