diff options
-rw-r--r-- | Makefile | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -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) |