2016-01-28 14:37:39 +00:00
|
|
|
CC = g++
|
|
|
|
LINKER = g++
|
|
|
|
CFLAGS = -std=c++14 -Wall -Werror -Wpointer-arith -Wfatal-errors
|
|
|
|
DEBUG = -g
|
|
|
|
|
|
|
|
prefix=/usr/local
|
|
|
|
|
2018-09-05 19:51:13 +00:00
|
|
|
all: shepherd
|
2016-01-28 14:37:39 +00:00
|
|
|
|
2016-01-28 17:06:36 +00:00
|
|
|
shepherd: src/*.cpp src/*.h
|
2016-01-28 14:37:39 +00:00
|
|
|
mkdir -p bin
|
2016-01-28 17:06:36 +00:00
|
|
|
$(CC) $(CFLAGS) src/*.cpp -o bin/shepherd -lsqlite3
|
2016-01-28 14:37:39 +00:00
|
|
|
|
2016-01-28 17:06:36 +00:00
|
|
|
rsa: rsa.cpp
|
2016-01-28 14:37:39 +00:00
|
|
|
mkdir -p bin
|
2016-01-28 17:06:36 +00:00
|
|
|
$(CC) $(CFLAGS) rsa.cpp -o bin/rsa -lssl -lcrypto
|
2016-01-28 14:37:39 +00:00
|
|
|
|
|
|
|
install: bin/shepherd
|
|
|
|
install -m 0755 bin/shepherd $(prefix)/bin
|
|
|
|
|
2018-09-05 19:51:13 +00:00
|
|
|
.PHONY: test
|
|
|
|
test:
|
|
|
|
test/test.sh test/test.db
|
|
|
|
|
2016-01-28 14:37:39 +00:00
|
|
|
# remove produced files, invoke as "make clean"
|
|
|
|
clean:
|
|
|
|
rm -f bin/*
|
2018-09-05 19:51:13 +00:00
|
|
|
|
|
|
|
#%.o : %.cpp
|
|
|
|
# $(CC) $(CFLAGS) -c $^ -o $@
|
|
|
|
|