summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2022-04-18 19:12:52 -0400
committerJakob Kaivo <jkk@ung.org>2022-04-18 19:12:52 -0400
commit1fa82850d87a0f5526153655a2368c46ea447a90 (patch)
tree5ffd8c628a4a221b93cd68b36ec82b6e182bd314 /Makefile
parent344424ffafe5e3b310b5595d897579544abdb90d (diff)
switch to curses
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 5 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 382ed04..58e1d8a 100644
--- a/Makefile
+++ b/Makefile
@@ -8,16 +8,20 @@ CC=c99
LD=$(CC)
CFLAGS=-Wall -Wextra -Wpedantic -Werror -g
LDFLAGS=
-LDLIBS=
+LDLIBS=-lcurses
SRCDIR=.
OBJDIR=.
BINDIR=$(OBJDIR)
+DESTDIR=/usr/local
all: $(BINDIR)/more
clean:
rm -f $(BINDIR)/more $(OBJDIR)/*.o
+install: $(BINDIR)/more
+ cp $(BINDIR)/more $(DESTDIR)/bin
+
$(BINDIR)/more: $(OBJDIR)/io.o
$(OBJDIR)/io.o: $(SRCDIR)/more.h
$(OBJDIR)/io.o: $(SRCDIR)/io.c
@@ -28,10 +32,5 @@ $(OBJDIR)/more.o: $(SRCDIR)/more.h
$(OBJDIR)/more.o: $(SRCDIR)/more.c
$(CC) $(CFLAGS) -o $@ -c $(SRCDIR)/more.c
-$(BINDIR)/more: $(OBJDIR)/tty.o
-$(OBJDIR)/tty.o: $(SRCDIR)/more.h
-$(OBJDIR)/tty.o: $(SRCDIR)/tty.c
- $(CC) $(CFLAGS) -o $@ -c $(SRCDIR)/tty.c
-
$(BINDIR)/more:
$(LD) $(LDFLAGS) -o $@ $(OBJDIR)/*.o $(LDLIBS)