Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
34 lines (25 sloc) 780 Bytes
SOURCES=*.d lib/*.d radio/*.d lib/os/*.d The/*.d
VERSION=`cat VERSION`
VERSION_D=lib/RoofParty_v.d
DMD=dmd
OUT=roofparty
all: build
build: $(VERSION_D) $(SOURCES)
$(DMD) -debug -of$(OUT) -odbuild/debug $(SOURCES)
release: $(VERSION_D) $(SOURCES)
$(DMD) -inline -release -O -of$(OUT) -odbuild/release $(SOURCES)
test: $(VERSION_D) $(SOURCES)
$(DMD) -unittest -debug -of$(OUT) -odbuild/debug $(SOURCES)
$(VERSION_D): VERSION
@echo "// generated by make" > $(VERSION_D)
@echo "const char[] v = \"$(VERSION)\";" >> $(VERSION_D)
install: all
mkdir -p $(DESTDIR)/usr/local/bin
cp $(OUT) $(DESTDIR)/usr/local/bin
strip $(DESTDIR)/usr/local/bin/$(OUT)
clean:
rm -rf build
rm -f $(OUT)
rm -f $(VERSION_D)
@rm -f install.log
@for x in `find -name .\*~`; do rm $x; done