# This is a basic makefile that uses a flat directory structure. It could be # expanded to support multiple subdirectories and/or libraries # # In general, variables that are in all-caps denote configuration like # variables that are later used directly somewhere to be passed to the compiler # or other programs. all-lowercase names are temporaries that are generated and # will later be assembled to all-caps ones. ifneq ($(MAKECMDGOALS),conf) ifneq ($(MAKECMDGOALS),config) ifneq ($(MAKECMDGOALS),count) # include generated configuration only when not running configure... # don't worry if it's not there, then configure will be run -include $(TOPDIR)/makefile.conf endif endif endif ifneq ($(VERBOSE),true) SILENT=@ else SILENT= endif AR?=ar RANLIB?=ranlib ECHOEN?=echo -en LEX?=flex YACC?=bison IWIDL?=$(which iwidl) STERILFILES ?= nix STERILDIR ?= nix EXTRACLEANFILES?=nix # Flags added when building pic code for .so files cxx-fpic:= -fPIC c-fpic := -fPIC ld-fpic := -fPIC # flags that are shared by all common-cflags := -pipe -Wall -Wextra -D_REENTRANT common-cxxflags:= -pipe -Wall -Wextra -D_REENTRANT common-ldflags := -pipe # For displaying purposes ESC=`$(ECHOEN) "\033"` RED="$(ESC)[1;31m" GRN="$(ESC)[1;32m" YEL="$(ESC)[1;33m" BLU="$(ESC)[1;34m" VIO="$(ESC)[1;35m" TUK="$(ESC)[1;36m" WHT="$(ESC)[1;37m" NOR="$(ESC)[m" # here we add features that will depend on certain mode flags or other # features. The toplevel Makefile or the makefile.conf can add to the FEATURES # variable whatever they want. The MODE passed as make command line parameter # will be added to the features as a toplevel expandable one. MODE ?= debug # default mode # mode specific features add-features += on-opt-optimize # opt -> optimize abbreviation # opt flags add-features += on-optimize-O3 add-features += on-optimize-dndebug # debug flags add-features += on-debug-ggdb3 add-features += on-debug-glibcxx-debug add-features += on-debug-iwear-debug add-features += on-debug-ddebug # profile flags add-features += on-profile-optimize add-features += on-profile-fno-stack-protector # now the flags for machine specific stuff. First generalization of machines: add-features += on-machine_i586-machine_x86 # tell the compiler to use those specific machines add-features += on-machine_x86-m32 add-features += on-machine_x86_64-m64 # user specified mode to be able to override stuff add-features += $(MODE) # try to determine the machine to compile for MACHINE := $(shell gcc -dumpmachine| sed 's/-.*//g') TARGET := $(shell gcc -dumpmachine | sed 's/$(MACHINE)-//g' ) # that way user specified features will always get last, so they can override stuff... all-features := $(add-features) $(FEATURES) machine_$(MACHINE) # to prevent features from appearing multiple times in exp-features we always append those to be expanded only on-features := $(filter on-%,$(all-features)) exp-features := $(filter-out on-%,$(all-features)) # expand dependant features # Multiple times, unless someone figures out how to do this in some kind of # loop. Also the double patsubst+filter-out for the if is somewhat not what I # would like to have, but we cannot assign variables in between it seems. exp-features := $(foreach feat,$(exp-features), $(if $(filter-out on-%,$(patsubst on-$(feat)-%,%, $(on-features) ) ), $(filter-out on-%,$(patsubst on-$(feat)-%,%, $(on-features) ) ), $(feat)) ) exp-features := $(foreach feat,$(exp-features), $(if $(filter-out on-%,$(patsubst on-$(feat)-%,%, $(on-features) ) ), $(filter-out on-%,$(patsubst on-$(feat)-%,%, $(on-features) ) ), $(feat)) ) exp-features := $(foreach feat,$(exp-features), $(if $(filter-out on-%,$(patsubst on-$(feat)-%,%, $(on-features) ) ), $(filter-out on-%,$(patsubst on-$(feat)-%,%, $(on-features) ) ), $(feat)) ) exp-features := $(foreach feat,$(exp-features), $(if $(filter-out on-%,$(patsubst on-$(feat)-%,%, $(on-features) ) ), $(filter-out on-%,$(patsubst on-$(feat)-%,%, $(on-features) ) ), $(feat)) ) exp-features := $(foreach feat,$(exp-features), $(if $(filter-out on-%,$(patsubst on-$(feat)-%,%, $(on-features) ) ), $(filter-out on-%,$(patsubst on-$(feat)-%,%, $(on-features) ) ), $(feat)) ) exp-features := $(foreach feat,$(exp-features), $(if $(filter-out on-%,$(patsubst on-$(feat)-%,%, $(on-features) ) ), $(filter-out on-%,$(patsubst on-$(feat)-%,%, $(on-features) ) ), $(feat)) ) exp-features := $(foreach feat,$(exp-features), $(if $(filter-out on-%,$(patsubst on-$(feat)-%,%, $(on-features) ) ), $(filter-out on-%,$(patsubst on-$(feat)-%,%, $(on-features) ) ), $(feat)) ) # filter out the on- activation rules exp-features := $(filter-out on-%,$(exp-features)) md5-features := $(shell echo $(exp-features) | md5sum | cut -c1-32 ) cc-version := $(shell gcc -dumpversion) OBJ_DIR := bin-$(TARGET)-$(MACHINE)-$(cc-version)-$(md5-features) OBJ_DEPEND := $(OBJ_DIR)/.created OBJ_DEPEND_FILE = $(@D)/.$(*F).d # the rest might have duplicate entries due to multiple expansions upwards # now define the compiler flags set for the different features compflags-O3 := -O3 compflags-O2 := -O2 compflags-O1 := -O1 compflags-O0 := -O0 compflags-dndebug := -DNDEBUG compflags-ddebug := -DDEBUG compflags-fno-stack-protector := -fno-stack-protector compflags-ggdb3 := -ggdb3 compflags-iwear-debug := -DIWEAR_DEBUG cxxflags-glibcxx-debug := -D_GLIBCXX_DEBUG compflags-ffast-math := -ffast-math compflags-fmudflapth := -fmudflapth compflags-m32 := -m32 ldflags-m32 := -m32 compflags-m64 := -m64 ldflags-m64 := -m64 ldflags-fmudflapth := -lmudflapth -fmudflapth # now we have the list of features, collect the flags we need to set according # to it. We preserve the order that gets naturally with it here, since # sometimes one flag overrides another and that leads to binary incompatibilits # too. user-cflags := $(strip $(foreach f,$(exp-features),$(cflags-$(f)))) user-cflags += $(strip $(foreach f,$(exp-features),$(compflags-$(f)))) user-ldflags := $(strip $(foreach f,$(exp-features),$(ldflags-$(f)))) user-cxxflags := $(strip $(foreach f,$(exp-features),$(cxxflags-$(f)))) user-cxxflags += $(strip $(foreach f,$(exp-features),$(compflags-$(f)))) # Those need the stuff from makefile.conf BINDIR=$(PREFIX)/bin/ SHAREDIR=$(PREFIX)/share/ DOCDIR=$(SHAREDIR)/doc/packages/$(DISTDIR) LIBDIR=$(PREFIX)/lib/ INCDIR=$(PREFIX)/include/ LIBFILE=$(LIBNAME).$(DYN_SUFFIX).$(LIBVERSION) STATLIBFILE=$(LIBNAME).a # Where do we search for libfiles ? LIBINCLUDE=-L$(LIBDIR) -L$(LIBSEARCH) # Where do we search for include files ? INCLUDE=-I . -I ./include -I $(INCDIR) $(INCLUDES) DEPFLAG=-MMD -MF $(OBJ_DEPEND_FILE).tmp # flags for building non-pic objects (.ao) # C compiler CSTATFLAGS = $(common-cflags) $(user-cflags) $(DEPFLAG) $(INCLUDE) # C++ compiler CXXSTATFLAGS= $(common-cxxflags) $(user-cxxflags) $(DEPFLAG) $(INCLUDE) # Linking binaries statically LDSTATFLAGS = $(common-ldflags) $(user-ldflags) $(LIBINCLUDE) # flags for building pic objects (.o) # C compiler CFLAGS = $(CSTATFLAGS) $(c-fpic) # C++ compiler CXXFLAGS= $(CXXSTATFLAGS) $(cxx-fpic) # Linking binaries dynamically LDFLAGS = $(LDSTATFLAGS) $(ld-fpic) # Flags for the linker (g++) to link the final .so LIBLDFLAGS := $(LDFLAGS) $(LIBLIBS) $(LIBFLAGS) $(LIBINCLUDE) # Flags for the linker (ar) to link the final .a LIBLDSTATFLAGS := SUBDIR=$(notdir $(PWD)) SUBLIBNAME=lib-$(SUBDIR).a SUBLIBFILES=$(foreach subdir,$(SRCDIRS), $(foreach file,$(LIBFILES_$(notdir $(subdir))),$(OBJ_DIR)/$(file))) SUBLIBBASE=$(basename $(SUBLIBFILES)) PREFILES=$(addsuffix .pp, $(SUBLIBBASE)) STATFILES=$(addsuffix .ao, $(SUBLIBBASE)) SUBLIBCXXS=$(addsuffix .cpp, $(SUBLIBBASE)) TRANSBASE=$(basename $(TRANSTEMPLATE)) TRANSMO=$(addsuffix .mo, $(TRANSBASE)) # be aware, those are all sourcefiles, not only those going into library. CXXSRCFILES=$(foreach subdir,$(SRCDIRS), $(wildcard $(subdir)/*.cpp $(subdir)/*.cc )) CSRCFILES=$(foreach subdir,$(SRCDIRS), $(wildcard $(subdir)/*.c)) TRANSFILES=$(foreach subdir,$(TRANSDIRS), $(wildcard $(subdir)/*.cpp $(subdir)/*.cc $(subdir)/*.c $(subdir)/*.h)) EXTRAINCLUDES=$(foreach subdir,$(SRCDIRS), -I $(subdir)) SUBLIBS=$(foreach subdir,$(SRCDIRS),$(subdir)/lib-$(notdir $(subdir)).a) FULLLIB=$(TOPDIR)/lib/$(LIBFILE) ifeq ($(NOSTATLIB),true) FULLSTATLIB= else FULLSTATLIB=$(TOPDIR)/lib/$(STATLIBFILE) endif ifeq ($(TOPDIR),.) # include all the needed dependencies files ifneq ($(strip $(CSRCFILES)),) -include $(foreach src,$(SRCDIRS),$(CSRCFILES:$(src)/%.c=$(TOPDIR)/$(OBJ_DIR)/.%.d) ) endif ifneq ($(strip $(CXXSRCFILES)),) -include $(foreach src,$(SRCDIRS),$(patsubst $(src)/%.cc,$(TOPDIR)/$(OBJ_DIR)/.%.d,$(CXXSRCFILES:$(src)/%.cpp=$(TOPDIR)/$(OBJ_DIR)/.%.d))) endif endif # # START TARGETS # # create object binary directory. Trigger on update of the .created file for # dependency, since the timestamp of the directory itself changes $(OBJ_DEPEND): $(SILENT) mkdir -p $(@D) $(SILENT) echo $(exp-features) > $(OBJ_DIR)/features.txt $(SILENT) touch $@ # $(TOPDIR)/configure $(TOPDIR)/conf/functions $(TOPDIR)/conf/Makefile.common ifneq ($(MAKECMDGOALS),steril) $(TOPDIR)/makefile.conf: $(SILENT) echo $(RED)You need to run $(TOPDIR)/configure before starting compilation$(NOR) $(SILENT) $(MAKE) config endif conf config: $(TOPDIR)/configure $(TOPDIR)/conf/functions $(TOPDIR)/conf/Makefile.common $(SILENT) ./configure ifeq ($(ROOTDIR),true) lib libs: $(FULLLIB) $(FULLSTATLIB) trans $(OBJ_DIR)/$(LIBFILE): $(SUBLIBFILES) $(SILENT) echo $(BLU)[LD]$(NOR) $(LIBFILE) $(SILENT) $(CXX) $(LIBLDFLAGS) $(SUBLIBFILES) -o $(OBJ_DIR)/$(LIBFILE) $(FULLLIB): $(OBJ_DIR)/$(LIBFILE) FORCE $(SILENT) cd lib; ln -sf ../$(OBJ_DIR)/$(LIBFILE) . $(FULLSTATLIB): $(OBJ_DIR)/$(STATLIBFILE) FORCE $(SILENT) cd lib; ln -sf ../$(OBJ_DIR)/$(STATLIBFILE) . $(OBJ_DIR)/$(STATLIBFILE): $(STATFILES) $(SILENT) echo $(BLU)[AR]$(NOR) $(STATLIBFILE) $(SILENT) $(AR) r $(TOPDIR)/$(OBJ_DIR)/$(STATLIBFILE) $(STATFILES) $(SILENT) $(RANLIB) $(TOPDIR)/$(OBJ_DIR)/$(STATLIBFILE) confcheck: $(SILENT) echo "This is the current makefile configuration:" $(SILENT) echo "CFLAGS=$(CFLAGS)" $(SILENT) echo "CXXFLAGS=$(CXXFLAGS)" $(SILENT) echo "CSTATFLAGS=$(CSTATFLAGS)" $(SILENT) echo "CXXSTATFLAGS=$(CXXSTATFLAGS)" $(SILENT) echo "SUBLIBFILES=$(SUBLIBFILES)" $(SILENT) echo "SUBLIBBASE=$(SUBLIBBASE)" $(SILENT) echo "STATFILES=$(STATFILES)" $(SILENT) echo "PREFILES=$(PREFILES)" trans: $(SILENT) make -C $(TRANSDIR) trans merge: $(SILENT) make -C $(TRANSDIR) merge pre: $(PREFILES) $(SILENT) echo Generated all Preprocessor files $(SILENT) ls -la $(PREFILES) extract: $(SILENT) echo $(YEL)[XGETTEXT]$(NOR) $(TRANSFILES) $(SILENT) xgettext --omit-header -C -n -kI18NTRANS -ktrans include/*.h $(TRANSFILES) -j -o $(TRANSDIR)/$(TRANSTEMPLATE) endif $(LIBDIR): $(SILENT) echo $(BLU)[MKDIR]$(NOR) $@ $(SILENT) mkdir -p $@ $(INCDIR): $(SILENT) echo $(BLU)[MKDIR]$(NOR) $@ $(SILENT) mkdir -p $@ cleanall:: clean $(SILENT) rm -rf bin-* clean:: $(SILENT) echo $(VIO)[CLEAN]$(NOR) $(PWD) $(SILENT) for dir in $(SRCDIRS); do \ (rm -f *.o .depend* $$dir/*.moc.cpp $$dir/*.o $$dir/.depend* $$dir/$(EXTRACLEANFILES)) \ done $(SILENT) rm -f $(OBJ_DIR)/*.o $(SILENT) rm -f $(OBJ_DIR)/*.a $(SILENT) rm -f $(OBJ_DIR)/*.so* distclean: steril $(SILENT) echo $(VIO)[DISTCLEAN]$(NOR) $(PWD) $(SILENT) rm -f *.tar.bz2 $(SILENT) rm -f *.tar $(SILENT) rm -f *.tar.rk $(SILENT) rm -f config.cache mrproper steril: clean $(SILENT) echo $(VIO)[STERIL]$(NOR) $(PWD) $(SILENT) rm -rf $(STERILDIRS) $(SILENT) rm -f $(STERILFILES) $(SILENT) for dir in $(SRCDIRS); do \ (rm -f *.a *.s $$dir/*.a $$dir/*.s *.log *.tag) \ done .PHONY: doku docs doc conf config FORCE doku docs doc: $(SILENT) rm -f doxygen.log $(SILENT) echo $(BLU)[DOXYGEN]$(NOR) doxygen.conf \> doxygen.log $(SILENT) $(DOXYGEN) doxygen.conf &> doxygen.log # This adds dependencies for .o as well as .ao files and fake targets for the # files, in case we change the dependency of one. fixup_dependencies = \ $(SILENT) cp $(OBJ_DIR)/.$(1).d.tmp $(OBJ_DIR)/.$(1).d; \ sed -e "s|\.o|.ao|" $(OBJ_DIR)/.$(1).d.tmp >> $(OBJ_DIR)/.$(1).d; \ cat $(OBJ_DIR)/.$(1).d.tmp | sed -e "s/\#.*//" -e "s/^[^:]*: *//" -e "s/ *\\\\$$//" -e "s/ /\n/g" -e "s/[\t ]*//g" | \ sed -e "/^$$/d" -e "s/$$/ :/" >> $(OBJ_DIR)/.$(1).d define c-compile $(SILENT) $(CC) $(CFLAGS) -c $< -o $@ endef define cxx-compile $(SILENT) $(CXX) $(CXXFLAGS) -c $< -o $@ endef define c-static-compile $(SILENT) $(CC) $(CSTATFLAGS) -c $< -o $@ endef define cxx-static-compile $(SILENT) $(CXX) $(CXXSTATFLAGS) -c $< -o $@ endef define gen-compile-rules # Generic targets for objects that go into ar archives $$(OBJ_DIR)/%.o: $(1)/%.cpp $$(OBJ_DEPEND) $$(SILENT) echo $$(TUK)[CXX]$$(NOR) $$*.o $$(call cxx-compile) || (echo $$(cxx-compile); exit 1) $$(call fixup_dependencies,$$*) $$(OBJ_DIR)/%.ao: $(1)/%.cpp $$(OBJ_DEPEND) $$(SILENT) echo $$(TUK)[CXX]$$(NOR) $$*.ao $$(call cxx-static-compile) || (echo $$(cxx-static-compile); exit 1) $$(OBJ_DIR)/%.o: $(1)/%.c $$(OBJ_DEPEND) $$(SILENT) echo $$(YEL)[CC]$$(NOR) $$*.o $$(call c-compile) || (echo $$(c-compile); exit 1) $$(call fixup_dependencies,$$*) $$(OBJ_DIR)/%.ao: $(1)/%.c $$(OBJ_DEPEND) $$(SILENT) echo $$(YEL)[CC]$$(NOR) $$*.ao $$(call c-static-compile) || (echo $$(c-static-compile); exit 1) endef $(foreach src,$(SRCDIRS),$(eval $(call gen-compile-rules,$(src)))) # different tools: # %.cc:%.lex $(LEX) -d -o$*.cc $*.lex %.yy.cc:%.y $(YACC) -g -t --verbose -o $*.yy.cc -b $* -d $*.y %.yy.hh:%.y $(YACC) -g -t --verbose -o $*.yy.cc -b $* -d $*.y %common.cpp:%.idl $(IWIDL) $(IWIDL) -o $* -l cpp $*.idl %common.h:%.idl $(IWIDL) $(IWIDL) -o $* -l cpp $*.idl %server.cpp:%.idl $(IWIDL) $(IWIDL) -o $* -l cpp $*.idl %server.h:%.idl $(IWIDL) $(IWIDL) -o $* -l cpp $*.idl %client.cpp:%.idl $(IWIDL) $(IWIDL) -o $* -l cpp $*.idl %client.h:%.idl $(IWIDL) $(IWIDL) -o $* -l cpp $*.idl .SECONDARY:$(wildcard */*.moc.cpp) define MOC_TEMPLATE $(1)/%.moc.cpp:include/%.h $(SILENT) echo $$(TUK)[MOC]$$(NOR) $$^ $(SILENT) $$(MOC) $$^ > $$@ endef $(foreach dir,$(SRCDIRS), $(eval $(call MOC_TEMPLATE,$(dir)))) ifneq ($(ROOTDIR),true) sublib: $(SUBLIBFILES) $(SILENT) echo $(BLU)[AR]$(NOR) $(SUBLIBNAME) $(SILENT) $(AR) r $(SUBLIBNAME) $(SUBLIBFILES) $(SILENT) $(AR) s $(SUBLIBNAME) else endif .PHONY: help lib libs $(DISTDIR) help: $(SILENT) echo $(SILENT) echo $(WHT)Help for iwear $(DISTNAME)$(NOR) $(SILENT) echo $(SILENT) echo Possible Targets \($(GRN)green$(NOR) is default target\) $(SILENT) echo $(SILENT) echo -e $(GRN)lib$(NOR) "\t" Create ./lib/$(LIBNAME).so $(SILENT) echo -e $(TUK)test$(NOR) "\t" Create test program\(s\) in $(SRCDIR) $(SILENT) echo -e $(TUK)help$(NOR) "\t" Display this help screen $(SILENT) echo -e $(TUK)depend$(NOR) "\t" Generate dependencies $(SILENT) echo -e $(TUK)clean$(NOR) "\t" Remove compiler generated files $(SILENT) echo -e $(TUK)steril$(NOR) "\t" Remove all generated files too $(SILENT) echo -e $(RED)link$(NOR) "\t" Create inks necessary for linking $(SILENT) echo -e $(RED)dist$(NOR) "\t" Create links necessary for linking $(SILENT) echo $(DISTDIR): distclean $(SILENT) echo $(BLU)[MKDIR]$(NOR) $(DISTDIR) $(SILENT) mkdir -p .$(DISTDIR) $(SILENT) cp -r * .$(DISTDIR) $(SILENT) mv .$(DISTDIR) $(DISTDIR)-$(LIBVERSION) tar dist: $(DISTDIR) $(SILENT) echo $(BLU)[TAR]$(NOR) $(DISTDIR)-$(LIBVERSION).tar.bz2 $(SILENT) tar cjf $(DISTDIR)-$(LIBVERSION).tar.bz2 $(DISTDIR)-$(LIBVERSION) $(SILENT) rm -rf $(DISTDIR)-$(LIBVERSION) $(SILENT) mv $(DISTDIR)-$(LIBVERSION).tar.bz2 $$(pwd | sed 's/\/[^/]*$$//') $(SILENT) echo "sed 's/%$(DISTNAME)_VERSION%/$(LIBVERSION)/" >> $$(pwd | sed 's/\/[^/]*$$//')/distseds rk rkdist: distclean $(SILENT) echo $(BLU)[TAR]$(NOR) $(DISTDIR)-$(LIBVERSION).tar $(SILENT) tar cf $(DISTDIR)-$(LIBVERSION).tar $(DISTDIR)-$(LIBVERSION) $(SILENT) echo $(BLU)[RK]$(NOR) $(DISTDIR)-$(LIBVERSION).tar.rk $(SILENT) rk -mx $(DISTDIR)-$(LIBVERSION).tar.rk $(DISTDIR)-$(LIBVERSION).tar $(SILENT) rm -f $(DISTDIR)-$(LIBVERSION).tar $(SILENT) rm -rf $(DISTDIR)-$(LIBVERSION) iwear/iwear.h: $(SILENT) echo $(YEL)Cannot find iwear/iwear.h did you forgot to $(RED)make link$(YEL) in iwear/$(SRCDIR) ?$(NOR) $(SILENT) exit 1 count cnt: $(SILENT) echo $(GRN)[WC]$(NOR) *.cpp *.h $(SILENT) find | egrep "\.cpp$$|\.h$$" | xargs wc scount scnt: $(SILENT) echo $(GRN)[SLOCCOUNT]$(NOR) *.cpp *.h $(SILENT) sloccount --addlangall . SRCHOME=$(PWD) ifdef DISTNAME ifdef LIBNAME .PHONY: lnk links link rechts install rechts lnk links link:: $(LIBDIR) $(INCDIR) $(SILENT) if [ "$(DISTNAME)" != "$$(echo $(DISTNAME) | sed 's/[\*\?\.]//g' )" ];\ then\ echo "ERROR: DISTNAME INVALID";\ exit 1; \ fi $(SILENT) echo $(GRN)[LN -s]$(NOR) $(LIBFILE) $(SILENT) cd "$(LIBDIR)"; rm -f $(LIBNAME)* $(SILENT) cd "$(LIBDIR)";ln -sf "$(SRCHOME)/lib/$(LIBFILE)" $(SILENT) cd "$(LIBDIR)";ln -sf "$(LIBFILE)" "$(LIBNAME).$(DYN_SUFFIX)" $(SILENT) echo $(GRN)[LN -s]$(NOR) $(LIBNAME).a $(SILENT) cd $(LIBDIR) ;ln -sf "$(SRCHOME)/lib/$(STATLIBFILE)" "$(LIBNAME).a" $(SILENT) echo $(GRN)[LN -s]$(NOR) $(DISTNAME) $(SILENT) cd $(INCDIR); rm -rf $(DISTNAME) $(SILENT) cd $(INCDIR); ln -sf "$(SRCHOME)/include/" "$(DISTNAME)" $(SILENT) mkdir -p $(SHAREDIR)/locale/de_DE/LC_MESSAGES/ $(SILENT) mkdir -p $(SHAREDIR)/locale/ru_RU/LC_MESSAGES/ $(SILENT) mkdir -p $(SHAREDIR)/locale/zh_CN/LC_MESSAGES/ $(SILENT) mkdir -p $(SHAREDIR)/locale/fr_FR/LC_MESSAGES/ $(SILENT) cd $(SHAREDIR)/locale/de_DE/LC_MESSAGES/; ln -sf "$(SRCHOME)/share/locale/de_DE/LC_MESSAGES/$(TRANSMO)" . $(SILENT) cd $(SHAREDIR)/locale/ru_RU/LC_MESSAGES/; ln -sf "$(SRCHOME)/share/locale/ru_RU/LC_MESSAGES/$(TRANSMO)" . $(SILENT) cd $(SHAREDIR)/locale/zh_CN/LC_MESSAGES/; ln -sf "$(SRCHOME)/share/locale/zh_CN/LC_MESSAGES/$(TRANSMO)" . $(SILENT) cd $(SHAREDIR)/locale/fr_FR/LC_MESSAGES/; ln -sf "$(SRCHOME)/share/locale/fr_FR/LC_MESSAGES/$(TRANSMO)" . install: lib $(SILENT) echo $(YEL)Removing old files and versions$(NOR) $(SILENT) cd $(DEST)$(LIBDIR); rm -f $(LIBNAME)* $(SILENT) cd $(DEST)$(INCDIR); rm -rf $(DISTNAME) $(SILENT) echo $(YEL)[CP]$(NOR) $(LIB) $(SILENT) mkdir -p $(DEST)$(LIBDIR) $(SILENT) cp $(TOPDIR)/lib/$(LIB) $(DEST)$(LIBDIR) $(SILENT) echo $(YEL)[CP]$(NOR) $(STATLIB) $(SILENT) cp $(TOPDIR)/lib/$(STATLIB) $(DEST)$(LIBDIR) $(SILENT) echo $(GRN)[LN -s]$(NOR) $(LIBNAME).$(DYN_SUFFIX) $(SILENT) cd $(DEST)$(LIBDIR); ln -s $(LIB) $(LIBNAME).$(DYN_SUFFIX) $(SILENT) mkdir -p $(DEST)$(INCDIR)/$(DISTNAME)/ $(SILENT) cp include/*.h* $(DEST)$(INCDIR)/$(DISTNAME)/ $(SILENT) mkdir -p $(DEST)$(SHAREDIR)/locale/de_DE/LC_MESSAGES $(SILENT) cd $(DEST)$(SHAREDIR)/locale/de_DE/LC_MESSAGES/; \ for mo in "$(SRCHOME)/share/locale/de_DE/LC_MESSAGES/*.mo"; do\ (rm -f $$(basename $$mo); cp $$mo .) \ done $(SILENT) mkdir -p $(DEST)$(SHAREDIR)/locale/ru_RU/LC_MESSAGES $(SILENT) cd $(DEST)$(SHAREDIR)/locale/ru_RU/LC_MESSAGES/; \ for mo in "$(SRCHOME)/share/locale/ru_RU/LC_MESSAGES/*.mo"; do\ (rm -f $$(basename $$mo); cp $$mo .) \ done $(SILENT) mkdir -p $(DEST)$(SHAREDIR)/locale/zh_CN/LC_MESSAGES $(SILENT) cd $(DEST)$(SHAREDIR)/locale/zh_CN/LC_MESSAGES/; \ for mo in "$(SRCHOME)/share/locale/zh_CN/LC_MESSAGES/*.mo"; do\ (rm -f $$(basename $$mo); cp $$mo .) \ done $(SILENT) mkdir -p $(DEST)$(SHAREDIR)/locale/fr_FR/LC_MESSAGES $(SILENT) cd $(DEST)$(SHAREDIR)/locale/fr_FR/LC_MESSAGES/; \ for mo in "$(SRCHOME)/share/locale/fr_FR/LC_MESSAGES/*.mo"; do\ (rm -f $$(basename $$mo); cp $$mo .) \ done doc-install: $(SILENT) echo $(YEL)Removing old files and versions$(NOR) $(SILENT) cd $(DEST)$(DOCDIR); cd ..; rm -rf $(DISTDIR) $(SILENT) mkdir -p $(DEST)$(DOCDIR) $(SILENT) echo $(YEL)[CP]$(NOR) doc $(SILENT) cd doc;cp -r html $(DEST)$(DOCDIR)/ $(SILENT) cp COPYING $(DEST)$(DOCDIR) update: svn up $(MAKE) steril ./configure $(MAKE) -C . dep $(MAKE) -C . lnk $(MAKE) -C . lib endif endif