small changes in Makefiles

git-svn-id: svn://ttmath.org/publicrep/winix/trunk@731 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
Tomasz Sowa 2011-06-06 20:35:56 +00:00
parent 06551d6084
commit c84997be30
14 changed files with 77 additions and 85 deletions

View File

@ -1,5 +1,6 @@
# Makefile for GNU make # Makefile for GNU make
ifndef CXX ifndef CXX
CXX = g++ CXX = g++
endif 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 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 endif
export CXX export CXX
export CXXFLAGS export CXXFLAGS
all: winix.so plugins winix
all: winix winix.so: FORCE
winix: FORCE
@cd core ; $(MAKE) -e @cd core ; $(MAKE) -e
@cd db ; $(MAKE) -e @cd db ; $(MAKE) -e
@cd functions ; $(MAKE) -e @cd functions ; $(MAKE) -e
@cd notify ; $(MAKE) -e
@cd templates ; $(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/stats ; $(MAKE) -e
@cd plugins/thread ; $(MAKE) -e @cd plugins/thread ; $(MAKE) -e
@cd plugins/ticket ; $(MAKE) -e @cd plugins/ticket ; $(MAKE) -e
@cd plugins/gallery ; $(MAKE) -e @cd plugins/gallery ; $(MAKE) -e
@cd plugins/groupitem ; $(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: 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: depend:
@cd core ; $(MAKE) -e depend @cd core ; $(MAKE) -e depend
@cd db ; $(MAKE) -e depend @cd db ; $(MAKE) -e depend
@cd functions ; $(MAKE) -e depend @cd functions ; $(MAKE) -e depend
@cd templates ; $(MAKE) -e depend @cd templates ; $(MAKE) -e depend
@cd notify ; $(MAKE) -e depend @cd notify ; $(MAKE) -e depend
@cd plugins/stats ; $(MAKE) -e depend @cd plugins/stats ; $(MAKE) -e depend
@cd plugins/thread ; $(MAKE) -e depend @cd plugins/thread ; $(MAKE) -e depend
@cd plugins/ticket ; $(MAKE) -e depend @cd plugins/ticket ; $(MAKE) -e depend
@cd plugins/gallery ; $(MAKE) -e depend @cd plugins/gallery ; $(MAKE) -e depend
@cd plugins/groupitem ; $(MAKE) -e depend @cd plugins/groupitem ; $(MAKE) -e depend
@cd ../ezc/src ; $(MAKE) -e depend @cd ../ezc/src ; $(MAKE) -e depend
@cd main ; $(MAKE) -e depend @cd main ; $(MAKE) -e depend
install: all install: all

View File

@ -4,13 +4,10 @@ include Makefile.o.dep
all: $(o) all: $(o)
.SUFFIXES: .cpp .o %.o: %.cpp
.cpp.o:
$(CXX) -c $(CXXFLAGS) $< $(CXX) -c $(CXXFLAGS) $<
depend: depend:
makedepend -Y. -I.. -I../../ezc/src -f- *.cpp > Makefile.dep makedepend -Y. -I.. -I../../ezc/src -f- *.cpp > Makefile.dep
echo -n "o = " > Makefile.o.dep echo -n "o = " > Makefile.o.dep

View File

@ -13,6 +13,7 @@
void Dirs::SetDb(Db * pdb) void Dirs::SetDb(Db * pdb)
{ {
db = pdb; db = pdb;

View File

@ -148,6 +148,7 @@ void Plugin::LoadPlugin(const std::string & filename)
} }
void * Plugin::LoadInitFun(const char * filename, Fun1 & fun_init) void * Plugin::LoadInitFun(const char * filename, Fun1 & fun_init)
{ {
void * p = dlopen(filename, RTLD_NOW | RTLD_LOCAL); void * p = dlopen(filename, RTLD_NOW | RTLD_LOCAL);

View File

@ -4,13 +4,10 @@ include Makefile.o.dep
all: $(o) all: $(o)
.SUFFIXES: .cpp .o %.o: %.cpp
.cpp.o:
$(CXX) -c $(CXXFLAGS) $< $(CXX) -c $(CXXFLAGS) $<
depend: depend:
makedepend -Y. -I.. -I../../ezc/src -f- *.cpp > Makefile.dep makedepend -Y. -I.. -I../../ezc/src -f- *.cpp > Makefile.dep
echo -n "o = " > Makefile.o.dep echo -n "o = " > Makefile.o.dep

View File

@ -4,13 +4,10 @@ include Makefile.o.dep
all: $(o) all: $(o)
.SUFFIXES: .cpp .o %.o: %.cpp
.cpp.o:
$(CXX) -c $(CXXFLAGS) $< $(CXX) -c $(CXXFLAGS) $<
depend: depend:
makedepend -Y. -I.. -I../../ezc/src -f- *.cpp > Makefile.dep makedepend -Y. -I.. -I../../ezc/src -f- *.cpp > Makefile.dep
echo -n "o = " > Makefile.o.dep echo -n "o = " > Makefile.o.dep

View File

@ -4,13 +4,10 @@ include Makefile.o.dep
all: $(o) all: $(o)
.SUFFIXES: .cpp .o %.o: %.cpp
.cpp.o:
$(CXX) -c $(CXXFLAGS) $< $(CXX) -c $(CXXFLAGS) $<
depend: depend:
makedepend -Y. -I.. -I../../ezc/src -f- *.cpp > Makefile.dep makedepend -Y. -I.. -I../../ezc/src -f- *.cpp > Makefile.dep
echo -n "o = " > Makefile.o.dep echo -n "o = " > Makefile.o.dep

View File

@ -4,13 +4,10 @@ include Makefile.o.dep
all: $(o) all: $(o)
.SUFFIXES: .cpp .o %.o: %.cpp
.cpp.o:
$(CXX) -c $(CXXFLAGS) $< $(CXX) -c $(CXXFLAGS) $<
depend: depend:
makedepend -Y. -I.. -I../../ezc/src -f- *.cpp > Makefile.dep makedepend -Y. -I.. -I../../ezc/src -f- *.cpp > Makefile.dep
echo -n "o = " > Makefile.o.dep echo -n "o = " > Makefile.o.dep

View File

@ -3,14 +3,14 @@ include Makefile.o.dep
name = gallery.so name = gallery.so
all: $(o) all: $(name)
$(name): $(o)
$(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) *.o $(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) *.o
.SUFFIXES: .cpp .o %.o: %.cpp
.cpp.o:
$(CXX) -c $(CXXFLAGS) $< $(CXX) -c $(CXXFLAGS) $<

View File

@ -3,14 +3,14 @@ include Makefile.o.dep
name = groupitem.so name = groupitem.so
all: $(o) all: $(name)
$(name): $(o)
$(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) *.o $(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) *.o
.SUFFIXES: .cpp .o %.o: %.cpp
.cpp.o:
$(CXX) -c $(CXXFLAGS) $< $(CXX) -c $(CXXFLAGS) $<

View File

@ -3,14 +3,14 @@ include Makefile.o.dep
name = stats.so name = stats.so
all: $(o) all: $(name)
$(name): $(o)
$(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) *.o $(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) *.o
.SUFFIXES: .cpp .o %.o: %.cpp
.cpp.o:
$(CXX) -c $(CXXFLAGS) $< $(CXX) -c $(CXXFLAGS) $<

View File

@ -3,14 +3,14 @@ include Makefile.o.dep
name = thread.so name = thread.so
all: $(o) all: $(name)
$(name): $(o)
$(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) *.o $(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) *.o
.SUFFIXES: .cpp .o %.o: %.cpp
.cpp.o:
$(CXX) -c $(CXXFLAGS) $< $(CXX) -c $(CXXFLAGS) $<

View File

@ -3,14 +3,14 @@ include Makefile.o.dep
name = ticket.so name = ticket.so
all: $(o) all: $(name)
$(name): $(o)
$(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) *.o $(CXX) -shared -Wl,-soname,$(name).so -o $(name) $(CXXFLAGS) *.o
.SUFFIXES: .cpp .o %.o: %.cpp
.cpp.o:
$(CXX) -c $(CXXFLAGS) $< $(CXX) -c $(CXXFLAGS) $<

View File

@ -4,13 +4,10 @@ include Makefile.o.dep
all: $(o) all: $(o)
.SUFFIXES: .cpp .o %.o: %.cpp
.cpp.o:
$(CXX) -c $(CXXFLAGS) $< $(CXX) -c $(CXXFLAGS) $<
depend: depend:
makedepend -Y. -I.. -I../../ezc/src -f- *.cpp > Makefile.dep makedepend -Y. -I.. -I../../ezc/src -f- *.cpp > Makefile.dep
echo -n "o = " > Makefile.o.dep echo -n "o = " > Makefile.o.dep