Makefile

changeset 791
945ee9bf2dd1
parent 783
7ca8cf155489
     1.1 --- a/Makefile	Mon Jan 01 16:43:18 2024 +0100
     1.2 +++ b/Makefile	Tue Jan 02 23:31:00 2024 +0100
     1.3 @@ -21,61 +21,40 @@
     1.4  # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     1.5  # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     1.6  
     1.7 -include config.mk
     1.8 -
     1.9  all: compile test-compile FORCE
    1.10  
    1.11 -install:
    1.12 +install: config.mk FORCE
    1.13  	@cd src && $(MAKE) install
    1.14  
    1.15 -dist: FORCE
    1.16 -	$(MKDIR) $(dist_dir)/libucx
    1.17 -	$(COPYALL) CHANGELOG configure COPYING Doxyfile Makefile README \
    1.18 -		uaplogo.png docs make src tests $(dist_dir)/libucx/
    1.19 -	@cd $(dist_dir) && tar -czf libucx-src-$(VERSION).tar.gz -Hustar libucx
    1.20 -	@echo "[ Dist created: $(dist_dir)/libucx-src-$(VERSION).tar.gz ]"
    1.21 +dist: config.mk FORCE
    1.22 +	$(MAKE) -f make/makefile.mk dist
    1.23  
    1.24 -clean:
    1.25 -	$(RMDIR) $(build_dir)
    1.26 +clean: config.mk FORCE
    1.27 +	$(MAKE) -f make/makefile.mk clean
    1.28  
    1.29 -dist-clean:
    1.30 -	$(RMDIR) $(dist_dir)
    1.31 -	$(RMDIR) $(build_dir)
    1.32 +dist-clean: config.mk FORCE
    1.33 +	$(MAKE) -f make/makefile.mk dist-clean
    1.34  
    1.35 -compile: $(build_dir) static shared
    1.36 +compile: config.mk FORCE
    1.37 +	$(MAKE) -f make/makefile.mk compile
    1.38  
    1.39 -$(build_dir):
    1.40 -	$(MKDIR) $@
    1.41 +test-compile: config.mk FORCE
    1.42 +	$(MAKE) -f make/makefile.mk test-compile
    1.43  
    1.44 -shared: FORCE
    1.45 -	@cd src && $(MAKE) OBJ_EXT=.shared.o \
    1.46 -		CFLAGS="$(CFLAGS) $(SHLIB_CFLAGS)" \
    1.47 -		LDFLAGS="$(LDFLAGS) $(SHLIB_LDFLAGS)" \
    1.48 -		shared
    1.49 -
    1.50 -static: FORCE
    1.51 -	@cd src && $(MAKE) static
    1.52 -
    1.53 -check: all
    1.54 -	$(RMFILE) $(build_dir)/*.gcda
    1.55 -	$(RMFILE) $(build_dir)/tests/*.gcda
    1.56 -	$(build_dir)/tests/ucxtest
    1.57 +check: config.mk FORCE
    1.58 +	$(MAKE) -f make/makefile.mk check
    1.59  
    1.60  check-coverage: FORCE
    1.61  	$(MAKE) -s check
    1.62  	@cd src && $(MAKE) check-coverage
    1.63  
    1.64 -test-compile:
    1.65 -	cd tests && $(MAKE)
    1.66 +docs: config.mk FORCE
    1.67 +	$(MAKE) -f make/makefile.mk docs
    1.68  
    1.69 -docs: FORCE
    1.70 -	@(test "$(WITH_DOCS_API)" = "yes" && cd docs && $(MAKE) all-api) \
    1.71 -		|| echo "[ Generation of API Docs disabled - skipped ]"
    1.72 -	@(test "$(WITH_DOCS_HTML)" = "yes" && cd docs && $(MAKE) all-html) \
    1.73 -		|| echo "[ Generation of HTML Docs disabled - skipped ]"
    1.74 +update-rules: config.mk FORCE
    1.75 +	$(MAKE) -f make/makefile.mk update-rules
    1.76  
    1.77 -update-rules:
    1.78 -	make/update-rules.sh src
    1.79 -	CFLAGS='$(CFLAGS) -I../src' make/update-rules.sh tests '$$(TEST_DIR)'
    1.80 +config.mk:
    1.81 +	./configure --release
    1.82  
    1.83  FORCE:

mercurial