wut/tools/Makefile

52 lines
1.1 KiB
Makefile
Raw Normal View History

2016-01-04 14:46:52 +01:00
.SUFFIXES:
WUT_ROOT := $(CURDIR)/..
2016-01-04 18:10:32 +01:00
TARGETS := elf2rpl readrpl
2016-01-04 14:46:52 +01:00
ifeq ($(OS),Windows_NT)
all:
2016-06-03 01:04:22 +02:00
ifeq (, $(shell which msbuild 2> /dev/null))
$(warning "msbuild not found, try building with make-tools.bat from a vcvars prompt.")
else
$(shell msbuild tools/tools.sln /p:Configuration=Release)
endif
2016-01-04 14:46:52 +01:00
clean:
2016-06-03 01:04:22 +02:00
ifeq (, $(shell which msbuild 2> /dev/null))
$(shell msbuild tools/tools.sln /p:Configuration=Release /target:Clean)
else
$(warning "msbuild not found, try building with make-tools.bat from a vcvars prompt.")
endif
install: all
@mkdir -p $(WUT_ROOT)/bin
@for dir in $(TARGETS); do \
echo Installing $$dir; \
cp bin/$$dir $(WUT_ROOT)/bin; \
done
2016-01-04 14:46:52 +01:00
else
all:
@for dir in $(TARGETS); do \
echo; \
echo Entering Directory $$dir; \
$(MAKE) --no-print-directory -C $$dir; \
echo Leaving Directory $$dir; \
done
clean:
@for dir in $(TARGETS); do \
echo Cleaning $$dir; \
$(MAKE) --no-print-directory -C $$dir clean; \
done
install: all
@mkdir -p $(WUT_ROOT)/bin
@for dir in $(TARGETS); do \
echo Installing $$dir; \
cp $$dir/$$dir $(WUT_ROOT)/bin; \
done
endif
.PHONY: all install clean