github.com/jlmucb/cloudproxy@v0.0.0-20170830161738-b5aa0b619bc4/src/support_libraries/tao_support/taosupport.mak (about)

     1  #
     2  #    Copyright 2014 John Manferdelli, All Rights Reserved.
     3  #    Licensed under the Apache License, Version 2.0 (the "License");
     4  #    you may not use this file except in compliance with the License.
     5  #    You may obtain a copy of the License at
     6  #        http://www.apache.org/licenses/LICENSE-2.0
     7  #    or in the the file LICENSE-2.0.txt in the top level sourcedirectory
     8  #    Unless required by applicable law or agreed to in writing, software
     9  #    distributed under the License is distributed on an "AS IS" BASIS,
    10  #    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    11  #    See the License for the specific language governing permissions and
    12  #    limitations under the License
    13  #    Project: New Cloudproxy Crypto
    14  #    File: taosupport.mak
    15  
    16  ifndef SRC_DIR
    17  SRC_DIR=$(HOME)/src/github.com/jlmucb/cloudproxy/src
    18  endif
    19  ifndef OBJ_DIR
    20  OBJ_DIR=$(HOME)/cryptoobj
    21  endif
    22  ifndef EXE_DIR
    23  EXE_DIR=$(HOME)/cryptobin
    24  endif
    25  ifndef GOOGLE_INCLUDE
    26  GOOGLE_INCLUDE=/usr/local/include/google
    27  endif
    28  ifndef LOCAL_LIB
    29  LOCAL_LIB=/usr/local/lib
    30  endif
    31  ifndef TARGET_MACHINE_TYPE
    32  TARGET_MACHINE_TYPE= x64
    33  endif
    34  
    35  S= $(SRC_DIR)/support_libraries
    36  ST= $(S)/tao_support
    37  SP= $(S)/protos
    38  INCLUDE= -I$(ST) -I$(SP) -I$(SRC_DIR) -I/usr/local/include -I$(GOOGLE_INCLUDE) -I/usr/local/ssl/include
    39  
    40  CFLAGS=$(INCLUDE) -O3 -g -std=c++11 -Wno-deprecated-declarations -DFAKE_RAND_BYTES #-Wall
    41  
    42  OSName = YOSEMITE
    43  ifdef YOSEMITE
    44  	CC=clang++
    45  	LINK=clang++
    46  	PROTO=protoc
    47  	AR=ar
    48  	LDFLAGS= -L$(LOCAL_LIB) -L/usr/local/ssl/lib -lgtest -lgflags -lprotobuf -lpthread -lssl -lcrypto
    49  else
    50  	CC=g++
    51  	LINK=g++
    52  	PROTO=protoc
    53  	AR=ar
    54  	export LD_LIBRARY_PATH=/usr/local/lib
    55  	LDFLAGS= -L$(LD_LIBRARY_PATH) -L/usr/local/ssl/lib -lprotobuf -lgtest -lgflags -lpthread -lssl -lcrypto
    56  endif
    57  
    58  O= $(OBJ_DIR)
    59  dobj=	$(O)/taosupport_test.o $(O)/agile_crypto_support.o $(O)/keys.pb.o $(O)/attestation.pb.o \
    60          $(O)/ssl_helpers.o  #$(O)/taosupport.o
    61  
    62  all:	taosupport_test.exe
    63  clean:
    64  	@echo "removing object files"
    65  	rm $(O)/*.o
    66  	@echo "removing executable file"
    67  	rm $(EXE_DIR)/taosupport_test.exe
    68  
    69  taosupport_test.exe: $(dobj) 
    70  	@echo "linking executable files"
    71  	$(LINK) -o $(EXE_DIR)/taosupport_test.exe $(dobj) $(LDFLAGS)
    72  
    73  $(O)/taosupport_test.o: $(ST)/taosupport_test.cc
    74  	@echo "compiling taosupport_test.cc"
    75  	$(CC) $(CFLAGS) -c -o $(O)/taosupport_test.o $(ST)/taosupport_test.cc
    76  
    77  $(O)/agile_crypto_support.o: $(ST)/agile_crypto_support.cc
    78  	@echo "compiling agile_crypto_support.cc"
    79  	$(CC) $(CFLAGS) -c -o $(O)/agile_crypto_support.o $(ST)/agile_crypto_support.cc
    80  
    81  $(O)/ssl_helpers.o: $(ST)/ssl_helpers.cc
    82  	@echo "compiling ssl_helpers.cc"
    83  	$(CC) $(CFLAGS) -c -o $(O)/ssl_helpers.o $(ST)/ssl_helpers.cc
    84  
    85  $(O)/keys.pb.o: $(SP)/keys.pb.cc
    86  	@echo "compiling keys.pb.cc"
    87  	$(CC) $(CFLAGS) -c -o $(O)/keys.pb.o $(SP)/keys.pb.cc
    88  
    89  $(O)/attestation.pb.o: $(SP)/attestation.pb.cc
    90  	@echo "compiling attestation.pb.cc"
    91  	$(CC) $(CFLAGS) -c -o $(O)/attestation.pb.o $(SP)/attestation.pb.cc
    92  
    93  $(O)/taosupport.pb.o: $(ST)/taosupport.pb.cc
    94  	@echo "compiling taosupport.pb.cc"
    95  	$(CC) $(CFLAGS) -c -o $(O)/taosupport.pb.o $(ST)/taosupport.pb.cc
    96  
    97  #$(O)/taosupport.o: $(ST)/taosupport.cc
    98  	#@echo "compiling taosupport.cc"
    99  	#$(CC) $(CFLAGS) -DOS_POSIX -c -o $(O)/taosupport.o $(ST)/taosupport.cc