prepare for packaging
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
j3d1 2020-12-14 20:30:28 +01:00
parent 1d4ffa2602
commit 26b6b53b8c
12 changed files with 152 additions and 41 deletions

View file

@ -3,27 +3,26 @@ CXX = g++
LD = g++
CXXFLAGS = -std=c++17 -Wall -Werror -Wpointer-arith -Wfatal-errors
CFLAGS = -Wall -Werror -Wpointer-arith -Wfatal-errors
DEBUG = -g
prefix=/usr/local
#prefix=/usr/local
OBJECTS = build/memdb.o build/spmemvfs.o build/crypto.o build/Manager.o build/Database.o
all: build/shepherd
all: shepherd
build/shepherd: build/shepherd.o $(OBJECTS)
@mkdir -p $(dir $@)
@echo link $@
@$(LD) $(CXXFLAGS) $^ -o $@ -lsqlite3 -lsodium -lstdc++fs
build/test: build/testmemvfs.o $(OBJECTS)
build/test: build/shepherd.o $(OBJECTS)
@mkdir -p $(dir $@)
@echo link $@
@$(LD) $(CXXFLAGS) $^ -o $@ -lsqlite3 -lsodium -lstdc++fs
build/%.o: src/%.cpp src/%.h
@mkdir -p $(dir $@)
@echo complie $@
@echo compile $@
@$(CXX) $(CXXFLAGS) -c -o $@ $<
build/%.o: src/%.c src/%.h
@ -36,15 +35,17 @@ rsa: rsa.cpp
$(CC) $(CFLAGS) rsa.cpp -o bin/rsa -lssl -lcrypto
install: build/shepherd
install -m 0755 $@ $(prefix)/bin
install -m 0755 $^ $(DESTDIR)/usr/bin
.PHONY: test
test:
test/test.sh test/test.db
shepherd: build/shepherd
#.PHONY: test
#test: build/test
# test/test.sh test/test.db
# remove produced files, invoke as "make clean"
clean:
@echo clean build*
@echo clean build/*
@rm -f build/*
#%.o : %.cpp