added DC variable in Makefile

This commit is contained in:
skilion 2018-01-02 16:50:54 +01:00
parent 9f7d9249bc
commit 300b07df3b

View file

@ -1,4 +1,5 @@
DFLAGS = -ofonedrive -L-lcurl -L-lsqlite3 -L-ldl -J.
DC = dmd
DFLAGS = -g -ofonedrive -O -L-lcurl -L-lsqlite3 -L-ldl -J.
PREFIX = /usr/local
SOURCES = \
@ -20,25 +21,19 @@ all: onedrive onedrive.service
clean:
rm -f onedrive onedrive.o onedrive.service
debug: version $(SOURCES)
dmd -debug -g -gs $(DFLAGS) $(SOURCES)
install: all
install -D onedrive $(DESTDIR)$(PREFIX)/bin/onedrive
install -D -m 644 onedrive.service $(DESTDIR)/usr/lib/systemd/user/onedrive.service
onedrive: version $(SOURCES)
dmd -g -inline -O -release $(DFLAGS) $(SOURCES)
$(DC) $(DFLAGS) $(SOURCES)
onedrive.service:
sed "s|@PREFIX@|$(PREFIX)|g" onedrive.service.in > onedrive.service
unittest: $(SOURCES)
dmd -debug -g -gs -unittest $(DFLAGS) $(SOURCES)
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/onedrive
rm -f $(DESTDIR)/usr/lib/systemd/user/onedrive.service
version: .git/HEAD .git/index
echo $(shell git describe --tags 2>/dev/null) >version
echo $(shell git describe --tags) >version