-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (22 loc) · 699 Bytes
/
Makefile
File metadata and controls
31 lines (22 loc) · 699 Bytes
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
#libpbf Makefile
# use 'make' to compile the shared library
PREFIX = /usr/local
CC = g++
CFLAGS = -Wall -g -DLINUX -fPIC
LDFLAGS = -shared -lsnappy -lprotobuf
SOURCES = $(shell echo ./src/*cc)
OBJECTS = $(SOURCES: .cc=.o)
SO = libpbf.so
all: $(SO)
$(SO) : $(OBJECTS)
echo 'Regenerating protocol buffer classes'
protoc -I=protoc/ --cpp_out=src/ protoc/protocDef.proto
echo 'done.'
$(CC) $(LDFLAGS) $(OBJECTS) $(CFLAGS) -o $(SO)
install:
install -m 0755 $(SO) $(PREFIX)/lib/$(SO)
test -d $(PREFIX)/include/pbf || mkdir $(PREFIX)/include/pbf
install -m 0644 $(shell echo ./src/*h) $(PREFIX)/include/pbf/
.PHONY: install
clean:
rm $(SO)