diff options
Diffstat (limited to 'community/glpng/Makefile')
-rw-r--r-- | community/glpng/Makefile | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/community/glpng/Makefile b/community/glpng/Makefile new file mode 100644 index 000000000..d6772798f --- /dev/null +++ b/community/glpng/Makefile @@ -0,0 +1,30 @@ +CFLAGS+=-fPIC -Iinclude +LDFLAGS+=-lpng -lGL +SHAREDLIBFLAGS=-shared +DESTDIR=/usr/local +LIB=lib + +all: libglpng.a libglpng.so.1.45 + +libglpng.a: glpng.o + ar rv $@ $< + +libglpng.so.1.45: glpng.o + gcc $(CFLAGS) $(SHAREDLIBFLAGS) -Wl,-soname=libglpng.so.1 -Wl,--whole-archive $< -Wl,--no-whole-archive $(LDFLAGS) -o $@ + +glpng.o: src/glpng.c + gcc $(CFLAGS) -c $< + +clean: + rm glpng.o libglpng.* + +install: + for i in include include/GL $(LIB); do \ + install -m 755 -d $(DESTDIR)/$$i; \ + done + install -p -m 644 include/GL/glpng.h $(DESTDIR)/include/GL + install -m 755 libglpng.* $(DESTDIR)/$(LIB) + ln -s libglpng.so.1.45 $(DESTDIR)/$(LIB)/libglpng.so.1 + ln -s libglpng.so.1.45 $(DESTDIR)/$(LIB)/libglpng.so + +.PHONY: clean install |