From 6919f5aa12ef67fbdb6b0af1ee804cb76742824c Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Tue, 17 Sep 2019 14:46:44 +0200 Subject: [PATCH] Automatically extract function prototypes --- src/Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index 16dd1ed..a024f10 100644 --- a/src/Makefile +++ b/src/Makefile @@ -45,6 +45,16 @@ clean: %.o : %.c @echo -e "$(CC)\t$@" @$(CC) $(CFLAGS) -c $< $(INCLUDES) $(LIBINC) $(LIBS) $(DEFINES) -o $*.o - + +protos: $(CFILES) + @rm -f nzg_proto.h + @touch nzg_proto.h + @( echo -e "#ifndef _NZG_PROTO"; \ + echo -e "#define _NZG_PROTO 1\n"; \ + cproto *.c ; \ + echo -e "\n#endif") > nzg_proto.t + @mv nzg_proto.t nzg_proto.h + + edit: gvim *.c *.h