abraunegg-onedrive/Makefile
Giuseppe Luigi 05de30a408 Fix install in case no /usr/local/* exists
When installed the *onedrive.conf* file content was copied to the **file** /usr/local/etc, instead of creating the **missing** directory etc/ and then copying inside the file *onedrive.conf*.
2016-03-04 21:48:45 +01:00

37 lines
797 B
Makefile

DC = dmd
DFLAGS = -ofonedrive -L-lcurl -L-lsqlite3 -L-ldl
DESTDIR = /usr/local/bin
CONFDIR = /usr/local/etc
SOURCES = \
patch/etc_c_curl.d \
patch/std_net_curl.d \
src/config.d \
src/itemdb.d \
src/main.d \
src/monitor.d \
src/onedrive.d \
src/sqlite.d \
src/sync.d \
src/upload.d \
src/util.d
onedrive: $(SOURCES)
$(DC) -O -release -inline -boundscheck=off $(DFLAGS) $(SOURCES)
debug: $(SOURCES)
$(DC) -unittest -debug -g -gs $(DFLAGS) $(SOURCES)
clean:
rm -f onedrive.o onedrive
install: onedrive onedrive.conf
install onedrive $(DESTDIR)/onedrive
install -m 644 onedrive.conf $(CONFDIR)/onedrive.conf
install -m 644 onedrive.service /usr/lib/systemd/user
uninstall:
rm -f $(DESTDIR)/onedrive
rm -f $(CONFDIR)/onedrive.conf
rm -f /usr/lib/systemd/user/onedrive.service