File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed
Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -3,3 +3,4 @@ stb_image.h
33stb_image_write.h
44qoibench
55qoiconv
6+ qoi.pc
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ TARGET_CONV ?= qoiconv
1010PREFIX ?= /usr/local
1111BINDIR ?= $(PREFIX ) /bin
1212INCLUDEDIR ?= $(PREFIX ) /include
13+ LIBDIR ?= $(PREFIX ) /lib
1314
1415all : $(TARGET_BENCH ) $(TARGET_CONV )
1516
@@ -21,6 +22,9 @@ conv: $(TARGET_CONV)
2122$(TARGET_CONV ) :$(TARGET_CONV ) .c qoi.h
2223 $(CC ) $(CFLAGS_CONV ) $(CFLAGS ) $(TARGET_CONV ) .c -o $(TARGET_CONV ) $(LFLAGS_CONV )
2324
25+ qoi.pc : pc_gen.sh
26+ ./pc_gen.sh " $( PREFIX) " " $( INCLUDEDIR) " > qoi.pc
27+
2428.PHONY : install
2529install : install-tools install-header
2630
@@ -32,6 +36,7 @@ install-tools: all
3236.PHONY : install-header
3337install-header : qoi.h qoi.pc
3438 install -Dm 644 qoi.h $(DESTDIR )$(INCLUDEDIR ) /qoi.h
39+ install -Dm 644 qoi.pc $(DESTDIR )$(LIBDIR ) /pkgconfig/qoi.pc
3540
3641.PHONY : clean
3742clean :
Original file line number Diff line number Diff line change 1+ prefix=$1
2+ includedir=$2
3+
4+ if [[ $includedir == $prefix * ]]
5+ then
6+ includedir=' ${prefix}' ${includedir# " $prefix " }
7+ fi
8+
9+ cat << EOF
10+ prefix=$prefix
11+ includedir=$includedir
12+
13+ Name: qoi
14+ Description: The "Quite OK Image Format" for fast, lossless image compression
15+ Version: 0
16+ URL: https://qoiformat.org/
17+ License: MIT
18+ Cflags: -I\$ {includedir}
19+ EOF
You can’t perform that action at this time.
0 commit comments