File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ LFLAGS_CONV ?= $(LDFLAGS)
77TARGET_BENCH ?= qoibench
88TARGET_CONV ?= qoiconv
99
10+ PREFIX ?= /usr/local
11+ BINDIR ?= $(PREFIX ) /bin
12+ INCLUDEDIR ?= $(PREFIX ) /include
13+
1014all : $(TARGET_BENCH ) $(TARGET_CONV )
1115
1216bench : $(TARGET_BENCH )
@@ -17,6 +21,18 @@ conv: $(TARGET_CONV)
1721$(TARGET_CONV ) :$(TARGET_CONV ) .c qoi.h
1822 $(CC ) $(CFLAGS_CONV ) $(CFLAGS ) $(TARGET_CONV ) .c -o $(TARGET_CONV ) $(LFLAGS_CONV )
1923
24+ .PHONY : install
25+ install : install-tools install-header
26+
27+ .PHONY : install-tools
28+ install-tools : all
29+ install -Dm 755 $(TARGET_CONV ) $(DESTDIR )$(BINDIR ) /$(TARGET_CONV )
30+ install -Dm 755 $(TARGET_BENCH ) $(DESTDIR )$(BINDIR ) /$(TARGET_BENCH )
31+
32+ .PHONY : install-header
33+ install-header : qoi.h qoi.pc
34+ install -Dm 644 qoi.h $(DESTDIR )$(INCLUDEDIR ) /qoi.h
35+
2036.PHONY : clean
2137clean :
2238 $(RM ) $(TARGET_BENCH ) $(TARGET_CONV )
You can’t perform that action at this time.
0 commit comments