github.com/jlmucb/cloudproxy@v0.0.0-20170830161738-b5aa0b619bc4/src/standalone/mmake.mak (about) 1 # 2 3 # 4 # Make the libmodp.a 5 # 6 7 #ifndef GOOGLE_INCLUDE 8 GOOGLE_INCLUDE=/usr/local/include/google 9 #endif 10 #ifndef LOCAL_LIB 11 LOCAL_LIB=/usr/local/lib 12 #endif 13 14 MS= $(S)/third_party/modp/src 15 INCLUDE= -I$(MS) -I/usr/local/include -I$(GOOGLE_INCLUDE) -I$(INCLUDEDEST) 16 17 CFLAGS=$(INCLUDE) -DOS_POSIX -O3 -g -Wall -std=c++11 -Wno-strict-aliasing -Wno-deprecated # -DGFLAGS_NS=google 18 CFLAGS1=$(INCLUDE) -DOS_POSIX -O1 -g -Wall -std=c++11 19 20 CC=g++ 21 LINK=g++ 22 PROTO=protoc 23 AR=ar 24 export LD_LIBRARY_PATH=/usr/local/lib 25 LDFLAGS= -lprotobuf -lgtest -lgflags -lpthread -lglog -l$(LIBDEST)/libmodp.a -l$(LIBDEST)/libchromium.a 26 27 dobj_mlib=$(O)/modp_b64w.o 28 29 30 all: $(LIBDEST)/libmodp.a 31 32 clean: 33 @echo "removing object files" 34 rm $(O)/*.o 35 @echo "removing libmodp" 36 rm $(LIBDEST)/libmodp.a 37 38 $(LIBDEST)/libmodp.a: $(dobj_mlib) 39 @echo "linking libmodp.a" 40 $(AR) -r $(LIBDEST)/libmodp.a $(dobj_mlib) 41 42 $(O)/modp_b64w.o: $(MS)/modp_b64w.c 43 @echo "compiling modp_b64w.c" 44 $(CC) $(CFLAGS) -c -o $(O)/modp_b64w.o $(MS)/modp_b64w.c 45