From 814789d237a2287412932707ef31e27e38285a76 Mon Sep 17 00:00:00 2001 From: "\"John Hawthorn ext:(%22)" Date: Thu, 1 Jan 2009 02:45:55 -0800 Subject: added make install --- Makefile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index e1e4beb..29527c9 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,17 @@ -# User configuration --include config.mk - SRCFILES := $(wildcard src/*.c) OBJFILES := $(SRCFILES:%.c=%.o) DEPFILES := $(OBJFILES:%.o=%.d) CLEANFILES := $(CLEANFILES) $(DEPFILES) $(OBJFILES) meh -LIBS := -lX11 -lXext -ljpeg -lpng -lgif +LIBS ?= -lX11 -lXext -ljpeg -lpng -lgif +PREFIX ?= /usr/local +BINDIR = $(PREFIX)/bin + +# User configuration +-include config.mk + + + meh: $(OBJFILES) $(CC) $(LDFLAGS) -o $@ $(OBJFILES) $(LIBS) @@ -16,6 +21,9 @@ meh: $(OBJFILES) %.o: %.c Makefile $(CC) $(CFLAGS) -MMD -MP -MT "$*.d" -c -o $@ $< +install: + install -m 755 meh $(BINDIR) + # Clean clean: $(RM) $(CLEANFILES) -- cgit v1.2.3