-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
27 lines (18 loc) · 1.06 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# gcc -shared -fPIC -Wno-write-strings `pkg-config --cflags --libs gdk-pixbuf-2.0` -I./PVRTexLib -o libpixbufloader-pvrtc.so gdk-pixbuf-pvrtc.cc PVRTexLib/libPVRTexLib.a -lstdc++
#& sudo cp libpixbufloader-pvrtc.so /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-pvrtc.so && sudo
CFLAGS := -g -fPIC -Wall -Wno-write-strings -Wno-sign-compare $(shell pkg-config --cflags gdk-pixbuf-2.0)
INCLUDES := -I./PVRTexLib
GDK_PIXBUF_LIBS := $(shell pkg-config --libs gdk-pixbuf-2.0)
LIBS := PVRTexLib/libPVRTexLib.a -lstdc++ $(GDK_PIXBUF_LIBS)
INSTALL_DIR := $(shell pkg-config --variable=gdk_pixbuf_moduledir gdk-pixbuf-2.0)/
all: libpixbufloader-pvr.so gdk-pixbuf-texture-tool
libpixbufloader-pvr.so: gdk-pixbuf-pvr.cc
gcc -shared $(CFLAGS) $(INCLUDES) -o $@ $^ $(LIBS)
gdk-pixbuf-texture-tool: gdk-pixbuf-texture-tool.c
gcc -o $@ $(CFLAGS) $^ $(GDK_PIXBUF_LIBS)
install: libpixbufloader-pvr.so
cp $^ $(INSTALL_DIR)
gdk-pixbuf-query-loaders-32 --update-cache
clean:
rm -f libpixbufloader-pvr.so gdk-pixbuf-texture-tool
.PHONY: all install clean