2009-11-13 22:10:06 +01:00
|
|
|
include Makefile.o.dep
|
|
|
|
|
2012-01-12 03:32:04 +01:00
|
|
|
libname=ezc.a
|
2008-12-30 02:21:30 +01:00
|
|
|
|
2012-01-12 03:32:04 +01:00
|
|
|
all: $(libname)
|
2008-12-30 02:21:30 +01:00
|
|
|
|
2012-01-12 03:32:04 +01:00
|
|
|
$(libname): $(o)
|
|
|
|
ar rcs $(libname) $(o)
|
2008-12-30 02:21:30 +01:00
|
|
|
|
2013-10-16 01:48:06 +02:00
|
|
|
additionalinclude =
|
|
|
|
|
|
|
|
ifdef EZC_USE_WINIX_LOGGER
|
|
|
|
additionalinclude = -I../../winix
|
|
|
|
endif
|
|
|
|
|
2008-12-30 02:21:30 +01:00
|
|
|
|
2011-06-06 22:36:19 +02:00
|
|
|
%.o: %.cpp
|
2013-10-16 01:48:06 +02:00
|
|
|
$(CXX) -c $(CXXFLAGS) -I../../pikotools $(additionalinclude) $<
|
2008-12-30 02:21:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
depend:
|
2013-10-16 01:48:06 +02:00
|
|
|
# we do not use $(additionalinclude) here because the dependencies would be added to the repository
|
|
|
|
# and messes other projects
|
2014-10-11 21:56:48 +02:00
|
|
|
# !! IMPROVE ME
|
|
|
|
# as Ezc is a different project we rather shoudn't use '-I../../pikotools' here?
|
2012-01-12 04:20:01 +01:00
|
|
|
makedepend -Y. -I../../pikotools -f- *.cpp > Makefile.dep
|
2009-11-13 22:10:06 +01:00
|
|
|
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
|
2008-12-30 02:21:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.o
|
2012-01-12 03:32:04 +01:00
|
|
|
rm -f $(libname)
|
2008-12-30 02:21:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
include Makefile.dep
|