summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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)