aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2015-11-06 16:57:40 +0000
committerHarry Jeffery <harry@exec64.co.uk>2015-11-06 16:57:40 +0000
commita4259b506c030db954c57c4129cb01d69df67779 (patch)
tree4c928aebecfdcd18406fb8849cbbf9709185d317 /Makefile
parent84fbc128639c47cb9aa0382c70c58e85b9e66dde (diff)
downloadimv-a4259b506c030db954c57c4129cb01d69df67779.tar.gz
Add install target to makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index a1e80b7..6456194 100644
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,18 @@
-.PHONY: clean
+.PHONY: clean install
+
+prefix = /usr
CFLAGS = -g -W -Wall -std=c11 `sdl2-config --cflags`
LDFLAGS = `sdl2-config --libs` -lfreeimage
TARGET = imv
-SOURCES = $(wildcard *.c)
-OBJECTS = $(SOURCES:%.c=%.o)
+OBJECTS = main.o
$(TARGET): $(OBJECTS)
$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
clean:
$(RM) $(TARGET) $(OBJECTS)
+
+install: $(TARGET)
+ install -m 0755 $(TARGET) $(prefix)/bin