diff options
| author | ruki <[email protected]> | 2019-07-28 20:09:51 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-07-28 20:10:39 +0800 |
| commit | 1bb412afcd5d416bec002ea882b797499e60417c (patch) | |
| tree | 6690846fdf737a4bfa93396820d498686852b8ef /makefile | |
| parent | 29552afd90275c4a1cafc58cd39463afafe830f8 (diff) | |
improve makefile
Diffstat (limited to 'makefile')
| -rw-r--r-- | makefile | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -8,6 +8,10 @@ verbose:= # prefix prefix:=$(if $(prefix),$(prefix),$(if $(findstring /usr/local/bin,$(PATH)),/usr/local,/usr)) + +# the temporary directory +TMP_DIR :=$(if $(TMP_DIR),$(TMP_DIR),/tmp) + # platform PLAT :=$(if $(PLAT),$(PLAT),$(if ${shell uname | egrep -i linux},linux,)) PLAT :=$(if $(PLAT),$(PLAT),$(if ${shell uname | egrep -i darwin},macosx,)) @@ -50,7 +54,7 @@ ARCH :=$(if $(findstring amd64,$(ARCH)),x86_64,$(ARCH)) xmake_dir_install :=$(prefix)/share/xmake xmake_core :=./core/src/demo/demo.b xmake_core_install :=$(xmake_dir_install)/xmake -xmake_loader :=/tmp/xmake_loader +xmake_loader :=$(TMP_DIR)/xmake_loader xmake_loader_install:=$(prefix)/bin/xmake tip: @@ -62,6 +66,7 @@ build: @echo compiling xmake-core ... @if [ -f core/.config.mak ]; then rm core/.config.mak; fi @$(MAKE) -C core --no-print-directory f DEBUG=$(debug) + @$(MAKE) -C core --no-print-directory c @$(MAKE) -C core --no-print-directory install: @@ -85,7 +90,7 @@ install: @mv $(xmake_loader) $(xmake_loader_install) @chmod 777 $(xmake_loader_install) @# remove xmake.out - @if [ -f '/tmp/xmake.out' ]; then rm /tmp/xmake.out; fi + @if [ -f "$(TMP_DIR)/xmake.out" ]; then rm $(TMP_DIR)/xmake.out; fi @# ok @echo ok! |
