diff options
author | root <root@rshg054.dnsready.net> | 2012-01-31 23:14:57 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-01-31 23:14:57 +0000 |
commit | c34f78dd37c2a2015d43de5d89748a2f8147ba1b (patch) | |
tree | 2e3912930db02e8f8cbfa8a58eae203b886fa2d9 /community-testing/glpng/Makefile | |
parent | 902eddd7e029eda6fc1c668b31e696c6ca3edbc7 (diff) |
Tue Jan 31 23:14:56 UTC 2012
Diffstat (limited to 'community-testing/glpng/Makefile')
-rw-r--r-- | community-testing/glpng/Makefile | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/community-testing/glpng/Makefile b/community-testing/glpng/Makefile new file mode 100644 index 000000000..d6772798f --- /dev/null +++ b/community-testing/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 |