summaryrefslogtreecommitdiff
path: root/make.c
diff options
context:
space:
mode:
Diffstat (limited to 'make.c')
-rw-r--r--make.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/make.c b/make.c
index 918a900..1e21332 100644
--- a/make.c
+++ b/make.c
@@ -21,12 +21,16 @@ static void make_header(FILE *makefile, const char *target)
fprintf(makefile, "SRCDIR=.\n");
fprintf(makefile, "OBJDIR=.\n");
fprintf(makefile, "BINDIR=$(OBJDIR)\n");
+ fprintf(makefile, "DESTDIR=/usr/local\n");
fprintf(makefile, "\n");
fprintf(makefile, "all: $(BINDIR)/%s\n\n", target);
fprintf(makefile, "clean:\n");
fprintf(makefile, "\trm -f $(BINDIR)/%s $(OBJDIR)/*.o\n\n", target);
+
+ fprintf(makefile, "install: $(BINDIR)/%s\n", target);
+ fprintf(makefile, "\tcp $(BINDIR)/%s $(DESTDIR)/bin\n\n", target);
}
static void add_object(FILE *makefile, const struct majefile *src, const char *target)