2016-08-19 01:34:39 +02:00
|
|
|
ifeq ($(findstring CYGWIN,$(shell uname -s)),CYGWIN)
|
2016-06-03 01:04:22 +02:00
|
|
|
WUT_ROOT := $(shell cygpath -w ${CURDIR})
|
|
|
|
else
|
2015-12-27 03:10:38 +01:00
|
|
|
WUT_ROOT := $(CURDIR)
|
2016-06-03 01:04:22 +02:00
|
|
|
endif
|
|
|
|
|
2016-08-19 01:34:39 +02:00
|
|
|
TARGETS := tools crt rpl
|
2015-12-27 03:10:38 +01:00
|
|
|
|
2016-08-25 13:04:51 +02:00
|
|
|
DESTDIR ?= $(CURDIR)
|
2016-08-25 13:28:06 +02:00
|
|
|
INSTALLDIR := $(DESTDIR)
|
2016-08-25 13:04:51 +02:00
|
|
|
|
2016-06-03 01:04:22 +02:00
|
|
|
export WUT_ROOT
|
2016-08-25 13:04:51 +02:00
|
|
|
export INSTALLDIR
|
2016-06-03 01:04:22 +02:00
|
|
|
|
2015-12-27 03:10:38 +01:00
|
|
|
all:
|
|
|
|
@for dir in $(TARGETS); do \
|
|
|
|
echo; \
|
2016-01-04 14:17:43 +01:00
|
|
|
echo "Entering Directory $$dir"; \
|
2015-12-27 03:10:38 +01:00
|
|
|
$(MAKE) --no-print-directory -C $$dir; \
|
2016-01-04 14:17:43 +01:00
|
|
|
echo "Leaving Directory $$dir"; \
|
2015-12-27 03:10:38 +01:00
|
|
|
done
|
|
|
|
|
|
|
|
clean:
|
|
|
|
@for dir in $(TARGETS); do \
|
2016-01-04 14:46:52 +01:00
|
|
|
echo; \
|
2015-12-27 03:10:38 +01:00
|
|
|
echo Cleaning $$dir; \
|
|
|
|
$(MAKE) --no-print-directory -C $$dir clean; \
|
|
|
|
done
|
|
|
|
|
|
|
|
install:
|
2016-08-25 13:04:51 +02:00
|
|
|
@mkdir -p $(INSTALLDIR)
|
2016-08-25 13:28:06 +02:00
|
|
|
@cp -r include $(INSTALLDIR) || :
|
2015-12-27 03:10:38 +01:00
|
|
|
@for dir in $(TARGETS); do \
|
2016-01-04 14:46:52 +01:00
|
|
|
echo; \
|
2015-12-27 03:10:38 +01:00
|
|
|
echo Installing $$dir; \
|
|
|
|
$(MAKE) --no-print-directory -C $$dir install; \
|
|
|
|
done
|
|
|
|
|
|
|
|
.PHONY: all clean install
|