aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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