forked from Cloudname/nodee
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (41 loc) · 1.63 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Copyright Arnt Gulbrandsen <arnt@gulbrandsen.priv.no>; BSD-licensed.
COMPILER=g++
CFLAGS=-O3 -W -Wall -Werror
all: dropprivileges nodee nodeetest
dropprivileges: dropprivileges.c
${COMPILER} -o dropprivileges $(CFLAGS) dropprivileges.c
OBJECTS=chorekeeper.o httplistener.o httpserver.o init.o \
process.o serverspec.o service.o uid.o conf.o \
hoststatus.o port.o artifact.o zkclient.o log.o
ifeq ($(shell ./platform.sh), oneiric)
BOOSTLIBS=-lboost_thread -lboost_filesystem -lboost_system \
-lboost_program_options -lzookeeper_mt
ZKINCLUDE=-I/usr/include/zookeeper
endif
ifeq ($(shell ./platform.sh), lucid)
BOOSTLIBS=-lboost_thread -lboost_filesystem -lboost_program_options \
-lzookeeper_mt
ZKINCLUDE=-I/usr/include/c-client-src
endif
ifeq ($(shell ./platform.sh), Darwin)
BOOSTLIBS=-lboost_thread-mt -lboost_filesystem-mt -lboost_program_options-mt \
-lzookeeper_mt
ZKINCLUDE=-I/opt/local/include/zookeeper
endif
ifeq (${VERSION}, )
VERSION=$(shell whoami)-SNAPSHOT-$(shell git show --abbrev-commit --pretty=format:%H HEAD | head -1)
endif
ifeq (${DATE}, )
DATE=$(shell date +%Y-%m-%d)
endif
.cpp.o: Makefile
${COMPILER} ${ZKINCLUDE} -DVERSION=\"${VERSION}\" -DDATE=\"${DATE}\" -g -c -o $@ -O0 $<
nodee: ${OBJECTS} nodee.o Makefile
${COMPILER} -g -o nodee -L/opt/local/lib -L/usr/local/lib -pthread ${OBJECTS} nodee.o ${BOOSTLIBS}
clean:
-rm nodee nodeetest dropprivileges *.o
nodeetest: ${OBJECTS} test.o Makefile
${COMPILER} -g -o nodeetest -pthread ${OBJECTS} test.o ${BOOSTLIBS}
doc:
mkdir -p /tmp/nodeehtml
/home/arnt/bin/udoc -o 'Arnt Gulbrandsen' -u 'http://arnt.gulbrandsen.priv.no' -w /tmp/nodeehtml -p /tmp/nodee.ps *.cpp