summary refs log tree commit diff
path: root/bin/cash/Makefile
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-01-12 14:29:13 -0500
committerJune McEnroe <june@causal.agency>2019-01-12 14:29:13 -0500
commit4ec42616876188657fde1230f7c2ccd8396f18b1 (patch)
tree9fed0d34aebfe9f8bd2409e584cf856fab8d96c5 /bin/cash/Makefile
parentReplace libedit Makefile (diff)
downloadsrc-4ec42616876188657fde1230f7c2ccd8396f18b1.tar.gz
src-4ec42616876188657fde1230f7c2ccd8396f18b1.zip
Use local libedit
Diffstat (limited to 'bin/cash/Makefile')
-rw-r--r--bin/cash/Makefile25
1 files changed, 14 insertions, 11 deletions
diff --git a/bin/cash/Makefile b/bin/cash/Makefile
index 22b2a1b8..f1f026f0 100644
--- a/bin/cash/Makefile
+++ b/bin/cash/Makefile
@@ -1,8 +1,8 @@
 PREFIX = /usr/local
 MANDIR = $(PREFIX)/share/man
 
-CFLAGS += -std=c99 -Wall -Wextra -DSHELL
-LDLIBS = -ledit
+CFLAGS += -std=c99 -Wall -Wextra -DSHELL -Ilibedit
+LDLIBS = -lcurses
 
 -include config.mk
 
@@ -38,7 +38,7 @@ GENSRCS = builtins.c nodes.c syntax.c
 GENHDRS = builtins.h nodes.h syntax.h token.h
 
 SRCS += $(GENSRCS)
-OBJS = $(SRCS:.c=.o)
+OBJS = $(SRCS:.c=.o) libedit/libedit.a
 
 MAN1 = cash.1 cash-kill.1 cash-printf.1 cash-test.1
 
@@ -47,16 +47,11 @@ all: tags cash
 cash: $(OBJS)
 	$(CC) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@
 
-tags: *.h *.c
-	ctags -w *.h *.c
-
-depend: $(SRCS) $(GENHDRS)
-	$(CC) $(CFLAGS) -MM $(SRCS) > .depend
-
--include .depend
-
 $(OBJS): $(GENHDRS)
 
+libedit/libedit.a:
+	$(MAKE) -C libedit libedit.a
+
 builtins.c builtins.h: mkbuiltins builtins.def
 	sh mkbuiltins .
 
@@ -69,6 +64,14 @@ syntax.c syntax.h: mksyntax
 token.h: mktokens
 	sh mktokens
 
+tags: *.h *.c
+	ctags -w *.h *.c
+
+depend: $(SRCS) $(GENHDRS)
+	$(CC) $(CFLAGS) -MM $(SRCS) > .depend
+
+-include .depend
+
 clean:
 	rm -f cash $(OBJS) mknodes mksyntax $(GENSRCS) $(GENHDRS) tags .depend