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 90bea6f18d4e4562f63f196e9029fe2603793e83 (commit) from 89969fce89eede52612a2fa38ffa109dc66b38fb (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/90bea6f18d4e4562f63f196e9029fe2603793...
commit 90bea6f18d4e4562f63f196e9029fe2603793e83 Author: Cyril Hrubis metan@ucw.cz Date: Sat Feb 25 14:52:54 2012 +0100
build: Small cleanup + rebuild target.
diff --git a/Makefile b/Makefile index 6337e40..d180dd5 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOPDIR=. SUBDIRS=include libs tests pylib demos -include include.mk +include post.mk
# # Make sure tests are build after library and diff --git a/app.mk b/app.mk index 460ebf7..d852703 100644 --- a/app.mk +++ b/app.mk @@ -4,8 +4,7 @@ endif
LDLIBS+=-lm -ldl
-all: $(APPS) - +ALL+=$(APPS) CLEAN+=$(APPS)
%: %.o diff --git a/demos/Makefile b/demos/Makefile index 107f998..c148243 100644 --- a/demos/Makefile +++ b/demos/Makefile @@ -1,3 +1,3 @@ TOPDIR=.. SUBDIRS=grinder fbshow particle -include $(TOPDIR)/include.mk +include $(TOPDIR)/post.mk diff --git a/demos/fbshow/Makefile b/demos/fbshow/Makefile index c5acfc4..8921aff 100644 --- a/demos/fbshow/Makefile +++ b/demos/fbshow/Makefile @@ -11,5 +11,6 @@ APPS=fbshow
fbshow: cpu_timer.o
-include $(TOPDIR)/include.mk +include $(TOPDIR)/pre.mk include $(TOPDIR)/app.mk +include $(TOPDIR)/post.mk diff --git a/demos/grinder/Makefile b/demos/grinder/Makefile index c77d449..56117e6 100644 --- a/demos/grinder/Makefile +++ b/demos/grinder/Makefile @@ -9,5 +9,6 @@ APPS=grinder
grinder: params.o histogram.o
-include $(TOPDIR)/include.mk +include $(TOPDIR)/pre.mk include $(TOPDIR)/app.mk +include $(TOPDIR)/post.mk diff --git a/demos/particle/Makefile b/demos/particle/Makefile index 9843284..17cd059 100644 --- a/demos/particle/Makefile +++ b/demos/particle/Makefile @@ -9,5 +9,6 @@ APPS=particle_demo
$(APPS): space.o
-include $(TOPDIR)/include.mk +include $(TOPDIR)/pre.mk include $(TOPDIR)/app.mk +include $(TOPDIR)/post.mk diff --git a/gen.mk b/gen.mk index ef10aa4..14aac0d 100644 --- a/gen.mk +++ b/gen.mk @@ -1,5 +1,5 @@ # -# This is makefile rule for generating C sources from python generators +# This is makefile rule for generating C sources from python templates # ifndef LIBNAME $(error LIBNAME not defined, fix your library Makefile) @@ -14,14 +14,14 @@ GENSOURCES= endif
# -# Generate genfiles for generated sources +# We add these to CSOURCES which is handled in post.mk # CSOURCES+=$(GENSOURCES)
# # Make the genrated headers actually build # -all: $(GENHEADERS) $(GENSOURCES) +ALL+=$(GENHEADERS) $(GENSOURCES)
# # Base common templates location @@ -49,4 +49,3 @@ else @echo "GEN $@" @${PYTHON} ${TOPDIR}/pylib/bin/generate_file.py -t $(TEMPLATE_DIR) "$@.t" "$@" endif - diff --git a/include/Makefile b/include/Makefile index 03277e3..f098ae0 100644 --- a/include/Makefile +++ b/include/Makefile @@ -1,3 +1,3 @@ TOPDIR=.. SUBDIRS=core -include $(TOPDIR)/include.mk +include $(TOPDIR)/post.mk diff --git a/include/core/Makefile b/include/core/Makefile index bf82884..95e7064 100644 --- a/include/core/Makefile +++ b/include/core/Makefile @@ -3,5 +3,7 @@ GENHEADERS=GP_Convert_Scale.gen.h GP_Pixel.gen.h GP_GetPutPixel.gen.h GP_Convert.gen.h GP_FnPerBpp.gen.h GP_MixPixels.gen.h GP_GammaCorrection.gen.h LIBNAME=core + +include $(TOPDIR)/pre.mk include $(TOPDIR)/gen.mk -include $(TOPDIR)/include.mk +include $(TOPDIR)/post.mk diff --git a/lib.mk b/lib.mk index 397515a..1eceafa 100644 --- a/lib.mk +++ b/lib.mk @@ -1,31 +1,27 @@ +# +# Most of the libraries just generate object files that +# are later linked in build into the libGP.so +# 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 +# Rules for single library, applied only when objects +# are not linked to the libGP.so. This generates libGP_$(LIBNAME). # ifeq ($(BUILDLIB),yes) -all: $(LIBP)$(LIB).so $(LIBP)$(LIB).a -endif +# BUILDLIB = yes
-ifeq ($(BUILDLIB),yes) +LIB=libGP_$(LIBNAME) +LIBP=$(TOPDIR)/build/ + +ALL+=$(LIBP)$(LIB).so $(LIBP)$(LIB).a CLEAN+=$(LIBP)$(LIB).so $(LIBP)$(LIB).so.0 $(LIBP)$(LIB).a -endif +OBJS=$(CSOURCES:.c=.o)
-# -# Trigger libGP.XX library rebuild -# -all: $(OBJECTS) - @$(MAKE) --no-print-directory -C $(TOPDIR)/build/
-# -# Rules for single library -# -$(LIBP)$(LIB).so: $(OBJECTS) +$(LIBP)$(LIB).so: $(OBJS) ifdef VERBOSE rm -f $(LIBP)$(LIB).so.0 cd $(LIBP) && ln -s $(LIB).so $(LIB).so.0 @@ -37,7 +33,7 @@ else @$(CC) -fPIC -dPIC --shared -Wl,-soname -Wl,$(LIB).so.0 $(OBJECTS) -o $@ endif
-$(LIBP)$(LIB).a: $(OBJECTS) +$(LIBP)$(LIB).a: $(OBJS) ifdef VERBOSE $(AR) rcs $@ $(OBJECTS) else @@ -45,4 +41,12 @@ else @$(AR) rcs $@ $(OBJECTS) endif
-CLEAN+=$(OBJECTS) +else +# BUILDLIB = no + +ALL+=rebuild_lib + +rebuild_lib: + @$(MAKE) --no-print-directory -C $(TOPDIR)/build/ + +endif diff --git a/libs/Makefile b/libs/Makefile index 0842fc9..01fbd7a 100644 --- a/libs/Makefile +++ b/libs/Makefile @@ -1,3 +1,3 @@ TOPDIR=.. SUBDIRS=core gfx text loaders filters input backends SDL -include $(TOPDIR)/include.mk +include $(TOPDIR)/post.mk diff --git a/libs/SDL/Makefile b/libs/SDL/Makefile index 5ce0549..637277c 100644 --- a/libs/SDL/Makefile +++ b/libs/SDL/Makefile @@ -3,5 +3,7 @@ CSOURCES=$(shell ls *.c) INCLUDE=core LIBNAME=SDL BUILDLIB=yes -include $(TOPDIR)/include.mk + +include $(TOPDIR)/pre.mk include $(TOPDIR)/lib.mk +include $(TOPDIR)/post.mk diff --git a/libs/backends/Makefile b/libs/backends/Makefile index 60bbdaf..e59e2c1 100644 --- a/libs/backends/Makefile +++ b/libs/backends/Makefile @@ -2,5 +2,7 @@ TOPDIR=../.. CSOURCES=$(shell ls *.c) LIBNAME=backends BUILDLIB=yes -include $(TOPDIR)/include.mk + +include $(TOPDIR)/pre.mk include $(TOPDIR)/lib.mk +include $(TOPDIR)/post.mk diff --git a/libs/core/Makefile b/libs/core/Makefile index 2baef75..65d8440 100644 --- a/libs/core/Makefile +++ b/libs/core/Makefile @@ -4,6 +4,7 @@ GENSOURCES=GP_Pixel.gen.c GP_Blit.gen.c GP_Convert.gen.c CSOURCES=$(filter-out $(wildcard *.gen.c),$(wildcard *.c)) LIBNAME=core
+include $(TOPDIR)/pre.mk include $(TOPDIR)/gen.mk -include $(TOPDIR)/include.mk include $(TOPDIR)/lib.mk +include $(TOPDIR)/post.mk diff --git a/libs/filters/Makefile b/libs/filters/Makefile index d3b6012..216d06d 100644 --- a/libs/filters/Makefile +++ b/libs/filters/Makefile @@ -15,9 +15,10 @@ CSOURCES=$(filter-out $(wildcard *.gen.c),$(wildcard *.c)) LIBNAME=filters INCLUDE=core
+include $(TOPDIR)/pre.mk include $(TOPDIR)/gen.mk -include $(TOPDIR)/include.mk include $(TOPDIR)/lib.mk +include $(TOPDIR)/post.mk
$(POINT_FILTERS) $(ARITHMETIC_FILTERS) $(STATS_FILTERS): $(TEMPLATE_DIR)/filter.c.t $(STATS_FILTERS): $(TEMPLATE_DIR)/filter.stats.c.t diff --git a/libs/gfx/Makefile b/libs/gfx/Makefile index 60a485b..dae754e 100644 --- a/libs/gfx/Makefile +++ b/libs/gfx/Makefile @@ -4,6 +4,7 @@ GENSOURCES=GP_LineAA.gen.c GP_PutPixelAA.gen.c GP_HLineAA.gen.c GP_VLineAA.gen.c LIBNAME=gfx
+include $(TOPDIR)/pre.mk include $(TOPDIR)/gen.mk -include $(TOPDIR)/include.mk include $(TOPDIR)/lib.mk +include $(TOPDIR)/post.mk diff --git a/libs/input/Makefile b/libs/input/Makefile index afadcd1..4896a22 100644 --- a/libs/input/Makefile +++ b/libs/input/Makefile @@ -2,5 +2,7 @@ TOPDIR=../.. CSOURCES=$(shell ls *.c) INCLUDE=core LIBNAME=input -include $(TOPDIR)/include.mk + +include $(TOPDIR)/pre.mk include $(TOPDIR)/lib.mk +include $(TOPDIR)/post.mk diff --git a/libs/loaders/Makefile b/libs/loaders/Makefile index 5d037b7..0adfcfb 100644 --- a/libs/loaders/Makefile +++ b/libs/loaders/Makefile @@ -2,5 +2,7 @@ TOPDIR=../.. CSOURCES=$(shell ls *.c) INCLUDE=core LIBNAME=loaders -include $(TOPDIR)/include.mk + +include $(TOPDIR)/pre.mk include $(TOPDIR)/lib.mk +include $(TOPDIR)/post.mk diff --git a/libs/text/Makefile b/libs/text/Makefile index d58db9a..48c746f 100644 --- a/libs/text/Makefile +++ b/libs/text/Makefile @@ -3,9 +3,10 @@ GENSOURCES=GP_Text.gen.c CSOURCES=$(filter-out $(wildcard *.gen.c),$(wildcard *.c)) LIBNAME=text
+include $(TOPDIR)/pre.mk include $(TOPDIR)/gen.mk -include $(TOPDIR)/include.mk include $(TOPDIR)/lib.mk +include $(TOPDIR)/post.mk
GP_FreeType.dep: CFLAGS+=`freetype-config --cflags` GP_FreeType.o: CFLAGS+=`freetype-config --cflags` diff --git a/include.mk b/post.mk similarity index 79% rename from include.mk rename to post.mk index c8f8b18..fd95b0a 100644 --- a/include.mk +++ b/post.mk @@ -5,19 +5,22 @@ ifndef SUBDIRS SUBDIRS= endif
-.PHONY: $(SUBDIRS) all clean help +.PHONY: $(SUBDIRS) all clean rebuild help
all: $(SUBDIRS) clean: $(SUBDIRS) +rebuild: $(SUBDIRS)
help: @echo "*** Available targets ***" @echo "" - @echo "help: prints this help" + @echo "help: prints this help" @echo "" - @echo "clean: cleans current directory and all subdirectories" + @echo "clean: cleans current directory and all subdirectories" @echo "" - @echo "all: make current directory and all subdirectories" + @echo "all: make current directory and all subdirectories" + @echo "" + @echo "rebuild: does clean and all" @echo "" @echo "The default silent output could be turned off by defining" @echo "'VERBOSE' shell variable as 'VERBOSE=1 make'" @@ -38,10 +41,9 @@ ifeq ($(MAKECMDGOALS),) COMPILE=yes endif
-# -# Potential python dependencies for generated files and scripts -# -PYTHON_FILES=$(shell find "${PYLIBSDIR}" -name '*.py') +ifeq ($(MAKECMDGOALS),rebuild) +COMPILE=yes +endif
# # 1. Generate and include dependencies for all C sources @@ -54,7 +56,7 @@ ifeq ($(COMPILE),yes) -include $(DEPFILES) endif CLEAN+=$(subst .c,.dep,$(CSOURCES)) -OBJECTS=$(CSOURCES:.c=.o) +OBJECTS+=$(CSOURCES:.c=.o) CLEAN+=$(OBJECTS) endif
@@ -111,3 +113,8 @@ else @rm -f $(CLEAN) endif endif + +compile: $(DEPFILES) $(OBJECTS) $(ALL) + +rebuild: clean + @$(MAKE) --no-print-directory all diff --git a/pre.mk b/pre.mk new file mode 100644 index 0000000..b815a42 --- /dev/null +++ b/pre.mk @@ -0,0 +1 @@ +all: compile diff --git a/pylib/Makefile b/pylib/Makefile index 2d01e96..70aa08b 100644 --- a/pylib/Makefile +++ b/pylib/Makefile @@ -3,9 +3,7 @@ TOPDIR=.. # # Add .pyc files to CLEAN list # +PYTHON_FILES=$(shell find "${PYLIBSDIR}" -name '*.py') CLEAN+=$(patsubst %.py, %.pyc, ${PYTHON_FILES})
-include $(TOPDIR)/include.mk - -all: - @true +include $(TOPDIR)/post.mk diff --git a/tests/Makefile b/tests/Makefile index cfeab1c..d7405d2 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,3 +1,3 @@ TOPDIR=.. SUBDIRS=core SDL drivers -include $(TOPDIR)/include.mk +include $(TOPDIR)/post.mk diff --git a/tests/SDL/Makefile b/tests/SDL/Makefile index efb5272..7c91120 100644 --- a/tests/SDL/Makefile +++ b/tests/SDL/Makefile @@ -9,5 +9,6 @@ APPS=pixeltest fileview fonttest linetest randomshapetest shapetest sierpinsky symbolstest textaligntest trianglefps input blittest subcontext showimage aatest mixpixeltest
-include $(TOPDIR)/include.mk +include $(TOPDIR)/pre.mk include $(TOPDIR)/app.mk +include $(TOPDIR)/post.mk diff --git a/tests/core/Makefile b/tests/core/Makefile index 9cef404..8ab278b 100644 --- a/tests/core/Makefile +++ b/tests/core/Makefile @@ -9,5 +9,5 @@ GENSOURCES+=GP_Convert.test.gen.c GP_WritePixel.test.gen.c all: $(TESTSUITE)
include $(TOPDIR)/tests.mk -include $(TOPDIR)/include.mk +include $(TOPDIR)/post.mk
diff --git a/tests/drivers/Makefile b/tests/drivers/Makefile index dcf4129..c2d2679 100644 --- a/tests/drivers/Makefile +++ b/tests/drivers/Makefile @@ -6,5 +6,6 @@ LDLIBS+=-lGP -lGP_backends -lSDL -L$(TOPDIR)/build/
APPS=$(CSOURCES:.c=)
-include $(TOPDIR)/include.mk +include $(TOPDIR)/pre.mk include $(TOPDIR)/app.mk +include $(TOPDIR)/post.mk
-----------------------------------------------------------------------
Summary of changes: Makefile | 2 +- app.mk | 3 +-- demos/Makefile | 2 +- demos/fbshow/Makefile | 3 ++- demos/grinder/Makefile | 3 ++- demos/particle/Makefile | 3 ++- gen.mk | 7 +++---- include/Makefile | 2 +- include/core/Makefile | 4 +++- lib.mk | 42 +++++++++++++++++++++++------------------- libs/Makefile | 2 +- libs/SDL/Makefile | 4 +++- libs/backends/Makefile | 4 +++- libs/core/Makefile | 3 ++- libs/filters/Makefile | 3 ++- libs/gfx/Makefile | 3 ++- libs/input/Makefile | 4 +++- libs/loaders/Makefile | 4 +++- libs/text/Makefile | 3 ++- include.mk => post.mk | 25 ++++++++++++++++--------- pre.mk | 1 + pylib/Makefile | 6 ++---- tests/Makefile | 2 +- tests/SDL/Makefile | 3 ++- tests/core/Makefile | 2 +- tests/drivers/Makefile | 3 ++- 26 files changed, 85 insertions(+), 58 deletions(-) rename include.mk => post.mk (79%) create mode 100644 pre.mk
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.