aboutsummaryrefslogtreecommitdiff
path: root/sys/cmd/rc/rules.mk
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cmd/rc/rules.mk')
-rw-r--r--sys/cmd/rc/rules.mk29
1 files changed, 29 insertions, 0 deletions
diff --git a/sys/cmd/rc/rules.mk b/sys/cmd/rc/rules.mk
new file mode 100644
index 0000000..44c9b7a
--- /dev/null
+++ b/sys/cmd/rc/rules.mk
@@ -0,0 +1,29 @@
+include share/push.mk
+# Iterate through subdirectory tree
+
+# Local sources
+SRCS_$(d) :=\
+ $(d)/util.c\
+ $(d)/input.c\
+ $(d)/prompt.c\
+ $(d)/io.c\
+ $(d)/lex.c\
+ $(d)/parse.c\
+ $(d)/tree.c\
+ $(d)/code.c\
+ $(d)/var.c\
+ $(d)/sys.c\
+ $(d)/exec.c\
+ $(d)/main.c
+
+BINS_$(d) := $(d)/rc
+
+include share/paths.mk
+$(d)/parse.h $(d)/parse.c: $(d)/syntax.y
+ yacc --header=$(<D)/parse.h --output=$(<D)/parse.c $(<)
+
+# Local rules
+$(BINS_$(d)): $(OBJS_$(d)) $(OBJ_DIR)/sys/libn/libn.a $(d)/parse.h
+ $(COMPLINK)
+
+include share/pop.mk