summaryrefslogtreecommitdiff
path: root/comms/tn3270/files/mk/prog.mk
diff options
context:
space:
mode:
Diffstat (limited to 'comms/tn3270/files/mk/prog.mk')
-rw-r--r--comms/tn3270/files/mk/prog.mk32
1 files changed, 32 insertions, 0 deletions
diff --git a/comms/tn3270/files/mk/prog.mk b/comms/tn3270/files/mk/prog.mk
new file mode 100644
index 00000000000..7f4a37666a0
--- /dev/null
+++ b/comms/tn3270/files/mk/prog.mk
@@ -0,0 +1,32 @@
+# $NetBSD: prog.mk,v 1.1 2010/01/17 01:41:33 dholland Exp $
+
+OBJS=$(SRCS:T:R:=.o)
+
+all: $(PROG)
+
+$(PROG): $(OBJS)
+ $(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $(PROG)
+
+.for S in $(SRCS:M*.c)
+$(S:T:R).o: $(S)
+ $(CC) $(CFLAGS) -c $(S)
+.endfor
+
+.for S in $(SRCS:M*.y)
+$(S:T:R).o: $(S)
+ $(YACC) -o $(S:.y=.c) $(S)
+ $(CC) $(CFLAGS) -c $(S:.y=.c)
+.endfor
+
+genfiles: $(GENFILES)
+
+depend:
+ $(MAKE) genfiles
+ $(MKDEP) $(CFLAGS) $(SRCS) > .depend
+
+-include .depend
+
+clean distclean:
+ rm -f $(PROG) *.o $(SRCS:M*.y:.y=.c) $(GENFILES)
+
+.PHONY: all genfiles depend clean distclean