Automatically extract function prototypes

This commit is contained in:
Glenn Y. Rolland 2019-09-17 14:46:44 +02:00
parent e9a70f33ed
commit 6919f5aa12

View file

@ -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