summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile35
1 files changed, 35 insertions, 0 deletions
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)))
+