This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via ecb50dd5415f6b8079e3dda4e2cd0a4f9d8043d3 (commit) from 7f6bea085c6d5bdcef77c514eb41a96aac13e6d1 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/ecb50dd5415f6b8079e3dda4e2cd0a4f9d804...
commit ecb50dd5415f6b8079e3dda4e2cd0a4f9d8043d3 Author: Cyril Hrubis metan@ucw.cz Date: Sat May 28 17:46:33 2011 +0200
build: Fixed build, now we can create lib from directory.
diff --git a/Makefile b/Makefile index 35b28d4..972796b 100644 --- a/Makefile +++ b/Makefile @@ -27,22 +27,12 @@ HEADER_LOC=/usr/include/ LIB_LOC=/usr/lib/
install: - # core library -# install -m 775 -d $(HEADER_LOC)GP/ -# install -m 664 core/*.h $(HEADER_LOC)GP/ -# install -m 664 core/*.so core/*.so.0 core/*.a $(LIB_LOC) - # bitmap loaders -# install -m 775 -d $(HEADER_LOC)GP/loaders/ -# install -m 664 loaders/*.h $(HEADER_LOC)GP/loaders/ -# install -m 664 loaders/*.so loaders/*.so.0 loaders/*.a $(LIB_LOC) - # context filters -# install -m 775 -d $(HEADER_LOC)GP/filters/ -# install -m 664 filters/*.h $(HEADER_LOC)GP/filters/ -# install -m 664 filters/*.so filters/*.so.0 filters/*.a $(LIB_LOC) - # sdl target -# install -m 775 -d $(HEADER_LOC)GP/SDL/ -# install -m 664 targets/sdl/*.h $(HEADER_LOC)GP/SDL/ -# install -m 664 targets/sdl/*.so targets/sdl/*.so.0 targets/sdl/*.a $(LIB_LOC) +ifdef VERBOSE + ./install.sh "/tmp/" +else + @./install.sh "/tmp/" +endif
tar: + $(MAKE) clean cd .. && tar cjf gfxprim-`date +%Y-%b-%d-%HH%MM`.tar.bz2 gfxprim diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..50dbd4d --- /dev/null +++ b/install.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +INSTALL_PREFIX="$1" + +HEADER_LOC="$INSTALL_PREFIX/usr/include/" +LIB_LOC="$INSTALL_PREFIX/usr/lib/" + +# Headers +echo "INSTALL headers" +install -m 775 -d "$HEADER_LOC" +for i in `ls include/`; do + if [ -d "include/$i" ]; then + echo " $i" + install -m 775 -d "${HEADER_LOC}GP/$i" + install -m 664 "include/$i/"*.h "${HEADER_LOC}GP/$i" + else + install -m 664 "include/$i" "${HEADER_LOC}GP/$i" + fi +done + +# Library +echo "INSTALL libraries" +install -m 775 -d "$LIB_LOC" +install -m 664 build/*.so build/*.so.0 build/*.a "$LIB_LOC" diff --git a/lib.mk b/lib.mk index a8bccff..52793ca 100644 --- a/lib.mk +++ b/lib.mk @@ -2,10 +2,47 @@ ifndef LIBNAME $(error LIBNAME not defined, fix your library Makefile) endif
+LIB=libGP_$(LIBNAME) +LIBP=$(TOPDIR)/build/ + +# +# If set to yes, builds single library for directory +# +ifeq ($(BUILDLIB),yes) +all: $(LIBP)$(LIB).so $(LIBP)$(LIB).a +endif + +ifeq ($(BUILDLIB),yes) +CLEAN+=$(LIBP)$(LIB).so $(LIBP)$(LIB).so.0 $(LIBP)$(LIB).a +endif + # -# Trigger library rebuild +# Trigger libGP.XX library rebuild # all: $(OBJECTS) @$(MAKE) --no-print-directory -C $(TOPDIR)/build/
+# +# Rules for single library +# +$(LIBP)$(LIB).so: $(OBJECTS) +ifdef VERBOSE + rm -f $(LIBP)$(LIB).so.0 + ln -s $(LIB).so $(LIBP)$(LIB).so.0 + $(CC) -fPIC -dPIC --shared -Wl,-soname -Wl,$@.0 $(OBJECTS) -o $@ +else + @rm -f $(LIBP)$(LIB).so.0 + @ln -s $(LIB).so $(LIBP)$(LIB).so.0 + @echo "LD $@" + @$(CC) -fPIC -dPIC --shared -Wl,-soname -Wl,$@.0 $(OBJECTS) -o $@ +endif + +$(LIBP)$(LIB).a: $(OBJECTS) +ifdef VERBOSE + $(AR) rcs $@ $(OBJECTS) +else + @echo "AR $@" + @$(AR) rcs $@ $(OBJECTS) +endif + CLEAN+=$(OBJECTS) diff --git a/libs/core/Makefile b/libs/core/Makefile index 0ef2e5b..8994912 100644 --- a/libs/core/Makefile +++ b/libs/core/Makefile @@ -1,12 +1,7 @@ TOPDIR=../.. -GENSOURCES=GP_Pixel.gen.c -GENHEADERS=GP_Pixel.gen.h CSOURCES=$(filter-out $(wildcard *.gen.c),$(wildcard *.c)) LIBNAME=core
include $(TOPDIR)/gen.mk include $(TOPDIR)/include.mk include $(TOPDIR)/lib.mk - -GP_Pixel.gen.c $(INCLUDE_PREFIX)GP_Pixel.gen.h: gen/make_GP_Pixel.py - python gen/make_GP_Pixel.py $(INCLUDE_PREFIX)GP_Pixel.gen.h GP_Pixel.gen.c diff --git a/libs/sdl/Makefile b/libs/sdl/Makefile index ede8ef8..a92d775 100644 --- a/libs/sdl/Makefile +++ b/libs/sdl/Makefile @@ -1,5 +1,6 @@ TOPDIR=../.. CSOURCES=$(shell ls *.c) LIBNAME=sdl +BUILDLIB=yes include $(TOPDIR)/include.mk include $(TOPDIR)/lib.mk diff --git a/tests/sdl/Makefile b/tests/sdl/Makefile index 41b109f..2795a44 100644 --- a/tests/sdl/Makefile +++ b/tests/sdl/Makefile @@ -3,14 +3,10 @@ TOPDIR=../.. CSOURCES=$(shell echo *.c)
INCLUDE=core gfx sdl backends -LDLIBS+=-lGP -L$(TOPDIR)/build/ -lSDL +LDLIBS+=-lGP -L$(TOPDIR)/build/ -lGP_SDL -lSDL
APPS=pixeltest fileview fonttest linetest randomshapetest shapetest sierpinsky- symboltest textaligntest trianglefps + symbolstest textaligntest trianglefps
include $(TOPDIR)/include.mk include $(TOPDIR)/app.mk - - -$(APPS): $(TOPDIR)/libs/sdl/*.o - diff --git a/tests/sdl/old.dddd b/tests/sdl/old.dddd deleted file mode 100644 index 2d2c9c0..0000000 --- a/tests/sdl/old.dddd +++ /dev/null @@ -1,19 +0,0 @@ -LIBRARY=../libGP_SDL.a ../../../libGP_core.a -LDFLAGS=-lSDL -L.. -L../../../core -lGP_SDL -lGP_core - -INCLUDE=-I.. -I../../../core -# Some warnings are triggered only with -O2 -# thuss added here -CFLAGS=$(INCLUDE) -ggdb -W -Wall -O -lm -SOURCES=$(shell ls *.c) -TESTS=$(SOURCES:.c=) - -all: $(TESTS) - -%: %.c $(LIBRARY) - $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBRARY) -o $@ - -clean: - rm -f *.o - rm -f $(TESTS) -
-----------------------------------------------------------------------
Summary of changes: Makefile | 22 ++++++---------------- install.sh | 24 ++++++++++++++++++++++++ lib.mk | 39 ++++++++++++++++++++++++++++++++++++++- libs/core/Makefile | 5 ----- libs/sdl/Makefile | 1 + tests/sdl/Makefile | 8 ++------ tests/sdl/old.dddd | 19 ------------------- 7 files changed, 71 insertions(+), 47 deletions(-) create mode 100755 install.sh delete mode 100644 tests/sdl/old.dddd
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.