From 9b0002fc40f4d8b97cf2064910a9ded467f29276 Mon Sep 17 00:00:00 2001 From: fishsoupisgood Date: Tue, 26 Feb 2019 10:56:52 +0000 Subject: fish --- Makefile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..01a4471 --- /dev/null +++ b/Makefile @@ -0,0 +1,35 @@ +CSRCS=time_fn.c msf.c util.c main.c +HSRCS=time_fn.h project.h + +OBJS=${CSRCS:%.c=%.o} + +PROG=msf + +CPPFLAGS= +CFLAGS=-Wall ${CPPFLAGS} + +CPROTO=cproto + +DEPFLAGS = -MT $@ -MMD -MP -MF $*.d + +${PROG}:${OBJS} + ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${OBJS} ${LIBS} + +%.o:%.c + ${CC} ${CFLAGS} ${DEPFLAGS} -c -o $@ $< + + +protos: + echo -n > prototypes.h + ${CPROTO} ${CPPFLAGS} -v -e ${CSRCS} > prototypes.h.new + cat prototypes.h.new > prototypes.h + /bin/rm -f prototypes.h.new + +clean: + /bin/rm -f *% *~ ${OBJS} ${PROG} *.d *.orig + +tidy: + astyle -A3 -s2 --attach-extern-c -L -c -w -Y -m0 -f -p -H -U -k3 -xj -xd ${CSRCS} ${HSRCS} ${LXCSRCS} + +-include $(patsubst %,%.d,$(basename $(CSRCS))) + -- cgit v1.2.3