para_server: switch to generated command list
[paraslash.git] / Makefile.in
index d7e2856..e05d75b 100644 (file)
@@ -148,6 +148,18 @@ grab_client.cmdline.h grab_client.cmdline.c: grab_client.ggo
                --set-package="para_$(subst .cmdline,,$(*F))" \
                --set-version="$V"  < $<
 
+server_command_list.c: server.cmd
+       echo '#include "server.h"' > $@
+       echo '#include "user_list.h"' >> $@
+       echo '#include "server_command_list.h"' >> $@
+       echo 'struct server_command cmd_struct[] = {' >>$@
+       ./command_util.sh array < $< >>$@
+       echo '{.name = NULL}};' >> $@
+
+server_command_list.h: server.cmd
+       echo 'extern struct server_command cmd_struct[];' > $@
+       ./command_util.sh proto < $< >> $@
+
 ortp_recv.o: ortp_recv.c
        $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) @ortp_cppflags@ $<
 
@@ -225,7 +237,7 @@ para_krell.so: $(krell_objs)
        $(CC) -Wall -fPIC @GTK_CFLAGS@ krell.o -o $@ @GTK_LIBS@ -shared
 
 clean:
-       rm -f *.o $(BINARIES)
+       rm -f *.o $(BINARIES) *_command_list.*
 
 distclean: clean
        rm -f Makefile autoscan.log config.status config.log && \