107 lines
3.1 KiB
Makefile
Executable File
107 lines
3.1 KiB
Makefile
Executable File
# Makefile for GNU make
|
|
|
|
|
|
ifndef CXX
|
|
CXX = g++
|
|
endif
|
|
|
|
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
|
|
|
|
|
|
|
|
winix.so: FORCE
|
|
@cd core ; $(MAKE) -e
|
|
@cd db ; $(MAKE) -e
|
|
@cd functions ; $(MAKE) -e
|
|
@cd notify ; $(MAKE) -e
|
|
@cd templates ; $(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
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
install: all
|
|
# binaries
|
|
mkdir -p /usr/local/winix/bin
|
|
cp winix.so /usr/local/winix/bin
|
|
# use the full path with winix.so (we have to recompile winix with a new path to winix.so)
|
|
$(CXX) -o /usr/local/winix/bin/winix $(CXXFLAGS) main/*.o /usr/local/winix/bin/winix.so
|
|
# html templates
|
|
mkdir -p /usr/local/winix/html
|
|
cp -rf html/ /usr/local/winix/html/
|
|
find /usr/local/winix/html/ -type d -name ".svn" | xargs -I foo rm -fr foo
|
|
# txt templates
|
|
mkdir -p /usr/local/winix/txt
|
|
cp -rf txt/ /usr/local/winix/txt/
|
|
find /usr/local/winix/txt/ -type d -name ".svn" | xargs -I foo rm -fr foo
|
|
# locales
|
|
mkdir -p /usr/local/winix/locale
|
|
cp -rf locale/ /usr/local/winix/locale/
|
|
find /usr/local/winix/locale/ -type d -name ".svn" | xargs -I foo rm -fr foo
|
|
# plugins
|
|
mkdir -p /usr/local/winix/plugins
|
|
find plugins/ -name "*.so" | xargs -I foo cp foo /usr/local/winix/plugins/
|
|
# removed provileges for others
|
|
find /usr/local/winix -exec chmod o-r,o-x,o-w "{}" "+"
|