From 8a6bead2170921aabeed0c0951c0b0773f703143 Mon Sep 17 00:00:00 2001 From: Miriam Ruiz Date: Wed, 3 Dec 2008 01:29:33 +0100 Subject: [PATCH] Added Makefile Obtained from Debian (release 1.45-4) Copyright (c) 2000 Filip Van Raemdonck --- Makefile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0daf632 --- /dev/null +++ b/Makefile @@ -0,0 +1,35 @@ +CFLAGS=-Wall -g -O3 -fPIC -I$(shell pwd)/include +LDFLAGS=-lpng -lGL +SHAREDLIBFLAGS=-shared +DESTDIR=/usr/local +DOCDIR=$(DESTDIR)/share/doc/libglpng + +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: libglpng.a libglpng.so.1.45 + for i in include include/GL lib; do \ + install -m 755 -d $(DESTDIR)/$$i; \ + done + for i in $(DOCDIR) $(DOCDIR)/examples; do \ + install -m 755 -d $$i; \ + done + install -m 644 glpng.htm $(DOCDIR)/glpng.html + install -m 644 Example/Stunt.png Example/Test.c $(DOCDIR)/examples + install -m 644 include/GL/glpng.h $(DESTDIR)/include/GL + install -m 644 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 -- 2.11.4.GIT