changed: using relative paths calculated with relative_path now
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@1032 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
parent
0e99ded5b8
commit
2190fae789
18
src/Makefile
18
src/Makefile
|
@ -2,6 +2,15 @@ include Makefile.o.dep
|
||||||
|
|
||||||
libname=ezc.a
|
libname=ezc.a
|
||||||
|
|
||||||
|
ifndef GLOBAL_WORKING_DIR
|
||||||
|
GLOBAL_WORKING_DIR := $(shell pwd)/../..
|
||||||
|
endif
|
||||||
|
|
||||||
|
current_path := $(shell pwd)
|
||||||
|
global_relative_working_dir := $(shell relative_path $(current_path) $(GLOBAL_WORKING_DIR))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
all: $(libname)
|
all: $(libname)
|
||||||
|
|
||||||
$(libname): $(o)
|
$(libname): $(o)
|
||||||
|
@ -10,20 +19,21 @@ $(libname): $(o)
|
||||||
additionalinclude =
|
additionalinclude =
|
||||||
|
|
||||||
ifdef EZC_USE_WINIX_LOGGER
|
ifdef EZC_USE_WINIX_LOGGER
|
||||||
additionalinclude = -I../../winix -I../../ezc/src
|
additionalinclude = $(EZC_ADDITIONAL_INCLUDE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%.o: %.cpp
|
%.o: %.cpp
|
||||||
$(CXX) -c $(CXXFLAGS) -I../../pikotools $(additionalinclude) $<
|
$(CXX) -c $(CXXFLAGS) -I$(GLOBAL_WORKING_DIR)/pikotools $(additionalinclude) $<
|
||||||
|
|
||||||
|
|
||||||
depend:
|
depend:
|
||||||
# we do not use $(additionalinclude) here because the dependencies would be added to the repository
|
# we do not use $(additionalinclude) here because the dependencies would be added to the repository
|
||||||
# and messes other projects
|
# and messes other projects
|
||||||
# !! IMPROVE ME
|
# !! IMPROVE ME
|
||||||
# as Ezc is a different project we rather shoudn't use '-I../../pikotools' here?
|
# as Ezc is a different project we rather shoudn't use '-I$(global_relative_working_dir)/pikotools' here?
|
||||||
makedepend -Y. -I../../pikotools -f- *.cpp > Makefile.dep
|
makedepend -Y. -I$(global_relative_working_dir)/pikotools -f- *.cpp > Makefile.dep
|
||||||
echo -n "o = " > Makefile.o.dep
|
echo -n "o = " > Makefile.o.dep
|
||||||
ls -1 *.cpp | xargs -I foo echo -n foo " " | sed -E "s/([^\.]*)\.cpp[ ]/\1\.o/g" >> Makefile.o.dep
|
ls -1 *.cpp | xargs -I foo echo -n foo " " | sed -E "s/([^\.]*)\.cpp[ ]/\1\.o/g" >> Makefile.o.dep
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue