Makefile
7a8a8a3b
 .DEFAULT_GOAL:=all
bc74530e
 
 .PHONY: all
 all: modules
 
ea2a6e38
 COREPATH=core
011dfa1d
 include Makefile.defs
a2a334f1
 
a024753f
 NAME=$(APP_NAME)
 
a59c8827
 subdirs = core apps tools
3c8d91e9
 
a2a334f1
 .PHONY: clean
 clean:
37abd537
 	-@rm -f *.so
44ba8c3c
 	-@for r in $(subdirs) doc "" ; do \
37abd537
 		if [ -n "$$r" ]; then \
 			echo "" ; \
a0dfd71a
 			echo "making $$r" ; \
37abd537
 			$(MAKE) -C $$r clean ; \
 		fi ; \
 	done
a2a334f1
 
 .PHONY: modules
 modules:
a0dfd71a
 	-@for r in $(subdirs) "" ; do \
37abd537
 		if [ -n "$$r" ]; then \
 			echo  "" ; \
a0dfd71a
 			echo  "making $$r" ; \
37abd537
 			$(MAKE) -C $$r all; \
 		fi ; \
 	done 
 
 .PHONY: install
 install:
a0dfd71a
 	-@for r in $(subdirs) "" ; do \
37abd537
 		if [ -n "$$r" ]; then \
 			echo "" ; \
 			echo "" ; \
 			$(MAKE) -C $$r install; \
a2a334f1
 		fi ; \
 	done
21b49855
 	@echo ""
 	@echo "*** install complete. Run SEMS with "
 	@echo "*** "
a024753f
 	@echo "***   $(bin-target)$(NAME) -f $(cfg-target)sems.conf"
21b49855
 
011dfa1d
 
 .PHONY: dist
 dist: tar
 
 .PHONY: tar
 tar: 
 	$(TAR) -C .. \
 		--exclude=$(notdir $(CURDIR))/tmp \
 		--exclude=core/$(notdir $(CURDIR))/tmp \
 		--exclude=.svn* \
d68ed96b
 		--exclude=.git* \
011dfa1d
 		--exclude=.\#* \
 		--exclude=*.[do] \
 		--exclude=*.la \
 		--exclude=*.lo \
 		--exclude=*.so \
 		--exclude=*.il \
 		--exclude=*.gz \
 		--exclude=*.bz2 \
 		--exclude=*.tar \
 		--exclude=*~ \
 		-cf - $(notdir $(CURDIR)) | \
 			(mkdir -p tmp/_tar1; mkdir -p tmp/_tar2 ; \
 			    cd tmp/_tar1; $(TAR) -xf - ) && \
 			    mv tmp/_tar1/$(notdir $(CURDIR)) \
42051b6d
 			       tmp/_tar2/"$(NAME)-$(RELEASE)" && \
011dfa1d
 			    (cd tmp/_tar2 && $(TAR) \
 			                    -zcf ../../"$(NAME)-$(RELEASE)".tar.gz \
42051b6d
 			                               "$(NAME)-$(RELEASE)" ) ; \
67f06cf8
 			    rm -rf tmp
 
5aa987ba
 # the rpmtar target creates source tar.gz file, with versions taken from rpm spec file
 # the tarball can be used for rpm building 
a2775951
 .PHONY: rpmtar
 rpmtar: 
ab00adfa
 	RPM_VERSION=`cat pkg/rpm/sems.spec|grep -e "^Version:"|awk '{print $$2}'`; \
5aa987ba
 	RPM_RELEASE=`cat pkg/rpm/sems.spec|grep -e "^Release:"|awk '{print $$2}'`; \
ab00adfa
 	echo "RPM_VERSION=$${RPM_VERSION}"; \
5aa987ba
 	echo "RPM_RELEASE=$${RPM_RELEASE}"; \
ab00adfa
 	        $(TAR) -C .. \
                 --exclude=$(notdir $(CURDIR))/tmp \
                 --exclude=core/$(notdir $(CURDIR))/tmp \
                 --exclude=.svn* \
                 --exclude=.git* \
                 --exclude=.\#* \
                 --exclude=*.[do] \
                 --exclude=*.la \
                 --exclude=*.lo \
                 --exclude=*.so \
                 --exclude=*.il \
                 --exclude=*.gz \
                 --exclude=*.bz2 \
                 --exclude=*.tar \
                 --exclude=*~ \
                 -cf - $(notdir $(CURDIR)) | \
                         (mkdir -p tmp/_tar1; mkdir -p tmp/_tar2 ; \
                             cd tmp/_tar1; $(TAR) -xf - ) && \
                             mv tmp/_tar1/$(notdir $(CURDIR)) \
                                tmp/_tar2/"$(NAME)-$${RPM_VERSION}" && \
                             (cd tmp/_tar2 && $(TAR) \
5aa987ba
                                             -zcf ../../"$(NAME)-$${RPM_VERSION}-$${RPM_RELEASE}".tar.gz \
ab00adfa
                                                        "$(NAME)-$${RPM_VERSION}" ) ; \
a2775951
                             rm -rf tmp;
ab00adfa
   
9d30e685
 .PHONY: doc
 doc:
44ba8c3c
 	make -C doc/ doc
c07ba6ac
 
df041a16
 .PHONY: fulldoc
 fulldoc:
44ba8c3c
 	make -C doc/ fulldoc