Currently job artifacts in CI/CD pipelines on LRZ GitLab never expire. Starting from Wed 26.1.2022 the default expiration time will be 30 days (GitLab default). Currently existing artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Makefile 1.78 KB
Newer Older
1
DCDBBUILDPATH ?= /tmp/dcdb/build/
2
DCDBDEPLOYPATH ?= $(DCDBBUILDPATH)/deploy/
3

4
CXXFLAGS =	-O0 -g -Wall -fmessage-length=0 -I$(DCDBDEPLOYPATH)/include/
5
OBJS =		CollectAgent.o cassandra/Cassandra.o cassandra/cassandra_constants.o cassandra/cassandra_types.o
6
LIBS =		-L$(DCDBDEPLOYPATH)/lib/ -lthrift -lmosquitto -lssl -lcrypto -lpthread
7
8
TARGET =	CollectAgent

9
SUBTARGETS = cassandra-lib
10

11
P =		$(shell cd $(DCDBDEPLOYPATH)/lib/ && pwd)
12
U =		$(shell uname)
13
14
15
16
17
18

$(TARGET):	$(SUBTARGETS) $(OBJS) 
	$(CXX) -o $(TARGET) $(OBJS) $(LIBS)

all:	$(TARGET)

19
20
21
22
check-thrift-env:
	@if [ "$U" = "Darwin" ]; then \
	R=`echo $$DYLD_LIBRARY_PATH | grep $P`; \
	if [ "$$R" = "" ]; then \
23
	echo "******************************************\nPlease type the following line before running:\n  export DYLD_LIBRARY_PATH=$$DYLD_LIBRARY_PATH:$P\n******************************************"; \
24
25
	fi; \
	fi
26
27
28
	@if [ "$U" = "Linux" ]; then \
	R=`echo $$LD_LIBRARY_PATH | grep $P`; \
	if [ "$$R" = "" ]; then \
29
	echo "******************************************\nPlease type the following line before running:\n  export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$P\n******************************************"; \
30
31
32
	fi; \
	fi

33

34
cassandra-lib: cassandra
35
	@if [ "$U" = "Linux" ]; then \
36
	echo "Fixing Thrift includes... "; \
37
38
39
	sed -i '1i#include <stdint.h>' cassandra/cassandra_types.h; \
	sed -i '1i#include <stdint.h>' cassandra/Cassandra.h; \
	fi
40

41
cassandra:
42
43
	@if [ ! -e cassandra ]; then \
	printf "Building Thrift interface headers... "; \
44
	$(DCDBDEPLOYPATH)/bin/thrift --gen cpp $(DCDBBUILDPATH)/apache-cassandra-1.2.3/interface/cassandra.thrift; \
45
46
47
48
49
50
51
52
	mv gen-cpp cassandra; \
	echo "Done."; \
	fi

clean: clean-cassandra-headers
	rm -f $(OBJS) $(TARGET)

clean-cassandra-headers:
53
	rm -rf cassandra
54
55
56

install: $(TARGET) check-thrift-env
	install $(TARGET) $(DCDBDEPLOYPATH)/bin/