From c84997be301d106c955fd418f27488fe6ea51e94 Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Mon, 6 Jun 2011 20:35:56 +0000 Subject: [PATCH] small changes in Makefiles git-svn-id: svn://ttmath.org/publicrep/winix/trunk@731 e52654a7-88a9-db11-a3e9-0013d4bc506e --- Makefile | 90 +++++++++++++++++++++----------------- core/Makefile | 5 +-- core/dirs.cpp | 1 + core/plugin.cpp | 1 + db/Makefile | 5 +-- functions/Makefile | 5 +-- main/Makefile | 5 +-- notify/Makefile | 5 +-- plugins/gallery/Makefile | 8 ++-- plugins/groupitem/Makefile | 8 ++-- plugins/stats/Makefile | 8 ++-- plugins/thread/Makefile | 8 ++-- plugins/ticket/Makefile | 8 ++-- templates/Makefile | 5 +-- 14 files changed, 77 insertions(+), 85 deletions(-) diff --git a/Makefile b/Makefile index d62dcfe..346b7bd 100755 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ # Makefile for GNU make + ifndef CXX CXX = g++ endif @@ -8,69 +9,76 @@ ifndef CXXFLAGS CXXFLAGS = -fPIC -Wall -pedantic -O2 -I/usr/local/include -I/home/tomek/roboczy/winix -I/home/tomek/roboczy/ezc/src -L/usr/local/lib -DEZC_USE_WINIX_LOGGER -DEZC_HAS_SPECIAL_STREAM endif - - export CXX export CXXFLAGS +all: winix.so plugins winix -all: winix - -winix: FORCE +winix.so: FORCE @cd core ; $(MAKE) -e @cd db ; $(MAKE) -e @cd functions ; $(MAKE) -e + @cd notify ; $(MAKE) -e @cd templates ; $(MAKE) -e - @cd notify ; $(MAKE) -e + @cd ../ezc/src ; $(MAKE) -e + $(CXX) -shared -o winix.so $(CXXFLAGS) core/*.o db/*.o functions/*.o templates/*.o notify/*.o ../ezc/src/ezc.a -lfcgi -lpq -lz -lpthread -lfetch + + +winix: FORCE + @cd main ; $(MAKE) -e + # use the full path with winix.so + $(CXX) -o winix $(CXXFLAGS) main/*.o /home/tomek/roboczy/winix/winix.so + + + +plugins: FORCE @cd plugins/stats ; $(MAKE) -e @cd plugins/thread ; $(MAKE) -e @cd plugins/ticket ; $(MAKE) -e @cd plugins/gallery ; $(MAKE) -e @cd plugins/groupitem ; $(MAKE) -e - @cd ../ezc/src ; $(MAKE) -e - $(CXX) -shared -o winix.so $(CXXFLAGS) core/*.o db/*.o functions/*.o templates/*.o notify/*.o ../ezc/src/ezc.a -lfcgi -lpq -lz -lpthread -lfetch - @cd main ; $(MAKE) -e - # use the full path with winix.so - $(CXX) -o winix $(CXXFLAGS) main/*.o /home/tomek/roboczy/winix/winix.so - - - -clean: - @cd core ; $(MAKE) -e clean - @cd db ; $(MAKE) -e clean - @cd functions ; $(MAKE) -e clean - @cd templates ; $(MAKE) -e clean - @cd notify ; $(MAKE) -e clean - @cd plugins/stats ; $(MAKE) -e clean - @cd plugins/thread ; $(MAKE) -e clean - @cd plugins/ticket ; $(MAKE) -e clean - @cd plugins/gallery ; $(MAKE) -e clean - @cd plugins/groupitem ; $(MAKE) -e clean - @cd ../ezc/src ; $(MAKE) -e clean - @cd main ; $(MAKE) -e clean - rm -f winix.so - rm -f winix FORCE: +clean: + @cd core ; $(MAKE) -e clean + @cd db ; $(MAKE) -e clean + @cd functions ; $(MAKE) -e clean + @cd templates ; $(MAKE) -e clean + @cd notify ; $(MAKE) -e clean + @cd plugins/stats ; $(MAKE) -e clean + @cd plugins/thread ; $(MAKE) -e clean + @cd plugins/ticket ; $(MAKE) -e clean + @cd plugins/gallery ; $(MAKE) -e clean + @cd plugins/groupitem ; $(MAKE) -e clean + @cd ../ezc/src ; $(MAKE) -e clean + @cd main ; $(MAKE) -e clean + rm -f winix.so + rm -f winix + + + + + depend: - @cd core ; $(MAKE) -e depend - @cd db ; $(MAKE) -e depend - @cd functions ; $(MAKE) -e depend - @cd templates ; $(MAKE) -e depend - @cd notify ; $(MAKE) -e depend - @cd plugins/stats ; $(MAKE) -e depend - @cd plugins/thread ; $(MAKE) -e depend - @cd plugins/ticket ; $(MAKE) -e depend - @cd plugins/gallery ; $(MAKE) -e depend - @cd plugins/groupitem ; $(MAKE) -e depend - @cd ../ezc/src ; $(MAKE) -e depend - @cd main ; $(MAKE) -e depend + @cd core ; $(MAKE) -e depend + @cd db ; $(MAKE) -e depend + @cd functions ; $(MAKE) -e depend + @cd templates ; $(MAKE) -e depend + @cd notify ; $(MAKE) -e depend + @cd plugins/stats ; $(MAKE) -e depend + @cd plugins/thread ; $(MAKE) -e depend + @cd plugins/ticket ; $(MAKE) -e depend + @cd plugins/gallery ; $(MAKE) -e depend + @cd plugins/groupitem ; $(MAKE) -e depend + @cd ../ezc/src ; $(MAKE) -e depend + @cd main ; $(MAKE) -e depend + install: all diff --git a/core/Makefile b/core/Makefile index 98f1f52..6cb46e9 100755 --- a/core/Makefile +++ b/core/Makefile @@ -4,13 +4,10 @@ include Makefile.o.dep all: $(o) -.SUFFIXES: .cpp .o - -.cpp.o: +%.o: %.cpp $(CXX) -c $(CXXFLAGS) $< - depend: makedepend -Y. -I.. -I../../ezc/src -f- *.cpp > Makefile.dep echo -n "o = " > Makefile.o.dep diff --git a/core/dirs.cpp b/core/dirs.cpp index 056d6fe..663a462 100755 --- a/core/dirs.cpp +++ b/core/dirs.cpp @@ -13,6 +13,7 @@ + void Dirs::SetDb(Db * pdb) { db = pdb; diff --git a/core/plugin.cpp b/core/plugin.cpp index 2344a8a..0e932bc 100755 --- a/core/plugin.cpp +++ b/core/plugin.cpp @@ -148,6 +148,7 @@ void Plugin::LoadPlugin(const std::string & filename) } + void * Plugin::LoadInitFun(const char * filename, Fun1 & fun_init) { void * p = dlopen(filename, RTLD_NOW | RTLD_LOCAL); diff --git a/db/Makefile b/db/Makefile index 98f1f52..6cb46e9 100755 --- a/db/Makefile +++ b/db/Makefile @@ -4,13 +4,10 @@ include Makefile.o.dep all: $(o) -.SUFFIXES: .cpp .o - -.cpp.o: +%.o: %.cpp $(CXX) -c $(CXXFLAGS) $< - depend: makedepend -Y. -I.. -I../../ezc/src -f- *.cpp > Makefile.dep echo -n "o = " > Makefile.o.dep diff --git a/functions/Makefile b/functions/Makefile index 98f1f52..6cb46e9 100755 --- a/functions/Makefile +++ b/functions/Makefile @@ -4,13 +4,10 @@ include Makefile.o.dep all: $(o) -.SUFFIXES: .cpp .o - -.cpp.o: +%.o: %.cpp $(CXX) -c $(CXXFLAGS) $< - depend: makedepend -Y. -I.. -I../../ezc/src -f- *.cpp > Makefile.dep echo -n "o = " > Makefile.o.dep diff --git a/main/Makefile b/main/Makefile index 98f1f52..6cb46e9 100755 --- a/main/Makefile +++ b/main/Makefile @@ -4,13 +4,10 @@ include Makefile.o.dep all: $(o) -.SUFFIXES: .cpp .o - -.cpp.o: +%.o: %.cpp $(CXX) -c $(CXXFLAGS) $< - depend: makedepend -Y. -I.. -I../../ezc/src -f- *.cpp > Makefile.dep echo -n "o = " > Makefile.o.dep diff --git a/notify/Makefile b/notify/Makefile index 98f1f52..6cb46e9 100755 --- a/notify/Makefile +++ b/notify/Makefile @@ -4,13 +4,10 @@ include Makefile.o.dep all: $(o) -.SUFFIXES: .cpp .o - -.cpp.o: +%.o: %.cpp $(CXX) -c $(CXXFLAGS) $< - depend: makedepend -Y. -I.. -I../../ezc/src -f- *.cpp > Makefile.dep echo -n "o = " > Makefile.o.dep diff --git a/plugins/gallery/Makefile b/plugins/gallery/Makefile index 65d7b98..a2e9039 100755 --- a/plugins/gallery/Makefile +++ b/plugins/gallery/Makefile @@ -3,14 +3,14 @@ include Makefile.o.dep name = gallery.so -all: $(o) +all: $(name) + +$(name): $(o) $(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) *.o -.SUFFIXES: .cpp .o - -.cpp.o: +%.o: %.cpp $(CXX) -c $(CXXFLAGS) $< diff --git a/plugins/groupitem/Makefile b/plugins/groupitem/Makefile index eb09c03..5c2081f 100755 --- a/plugins/groupitem/Makefile +++ b/plugins/groupitem/Makefile @@ -3,14 +3,14 @@ include Makefile.o.dep name = groupitem.so -all: $(o) +all: $(name) + +$(name): $(o) $(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) *.o -.SUFFIXES: .cpp .o - -.cpp.o: +%.o: %.cpp $(CXX) -c $(CXXFLAGS) $< diff --git a/plugins/stats/Makefile b/plugins/stats/Makefile index 5fe1cc3..fb44638 100755 --- a/plugins/stats/Makefile +++ b/plugins/stats/Makefile @@ -3,14 +3,14 @@ include Makefile.o.dep name = stats.so -all: $(o) +all: $(name) + +$(name): $(o) $(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) *.o -.SUFFIXES: .cpp .o - -.cpp.o: +%.o: %.cpp $(CXX) -c $(CXXFLAGS) $< diff --git a/plugins/thread/Makefile b/plugins/thread/Makefile index 31cd118..16827d3 100755 --- a/plugins/thread/Makefile +++ b/plugins/thread/Makefile @@ -3,14 +3,14 @@ include Makefile.o.dep name = thread.so -all: $(o) +all: $(name) + +$(name): $(o) $(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) *.o -.SUFFIXES: .cpp .o - -.cpp.o: +%.o: %.cpp $(CXX) -c $(CXXFLAGS) $< diff --git a/plugins/ticket/Makefile b/plugins/ticket/Makefile index 34e48aa..889fb2e 100755 --- a/plugins/ticket/Makefile +++ b/plugins/ticket/Makefile @@ -3,14 +3,14 @@ include Makefile.o.dep name = ticket.so -all: $(o) +all: $(name) + +$(name): $(o) $(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) *.o -.SUFFIXES: .cpp .o - -.cpp.o: +%.o: %.cpp $(CXX) -c $(CXXFLAGS) $< diff --git a/templates/Makefile b/templates/Makefile index 98f1f52..6cb46e9 100755 --- a/templates/Makefile +++ b/templates/Makefile @@ -4,13 +4,10 @@ include Makefile.o.dep all: $(o) -.SUFFIXES: .cpp .o - -.cpp.o: +%.o: %.cpp $(CXX) -c $(CXXFLAGS) $< - depend: makedepend -Y. -I.. -I../../ezc/src -f- *.cpp > Makefile.dep echo -n "o = " > Makefile.o.dep