aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
author"John Hawthorn ext:(%22) <jhawthor@uvic.ca>2009-01-01 02:45:55 -0800
committer"John Hawthorn ext:(%22) <jhawthor@uvic.ca>2009-01-01 02:45:55 -0800
commit814789d237a2287412932707ef31e27e38285a76 (patch)
treefbabaca7a6f8ab90b260cb1163a45c9f9bfa1320 /Makefile
parent93c941374ecee84b2e5cde62d13d8829b5843a38 (diff)
downloadmirror-meh-814789d237a2287412932707ef31e27e38285a76.tar.gz
mirror-meh-814789d237a2287412932707ef31e27e38285a76.tar.bz2
mirror-meh-814789d237a2287412932707ef31e27e38285a76.zip
added make install
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files 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)