diff options
-rw-r--r-- | Makefile | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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 |