github.com/jlmucb/cloudproxy@v0.0.0-20170830161738-b5aa0b619bc4/go/apps/simpleexample/SimpleClientCpp/simpleclient.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  #    File: simpleclient.mak
    14  
    15  #ifndef SRC_DIR
    16  SRC_DIR=$(HOME)
    17  #endif
    18  #ifndef OBJ_DIR
    19  OBJ_DIR=/Domains
    20  #endif
    21  #ifndef EXE_DIR
    22  EXE_DIR=/Domains
    23  #endif
    24  #ifndef GOOGLE_INCLUDE
    25  GOOGLE_INCLUDE=/usr/local/include/google
    26  #endif
    27  #ifndef LOCAL_LIB
    28  LOCAL_LIB=/usr/local/lib
    29  #endif
    30  #ifndef TARGET_MACHINE_TYPE
    31  TARGET_MACHINE_TYPE= x64
    32  #endif
    33  
    34  S= $(SRC_DIR)/src/github.com/jlmucb/cloudproxy/go/apps/simpleexample/SimpleClientCpp
    35  SL= $(SRC_DIR)/src/github.com/jlmucb/cloudproxy/src
    36  LIB_SOURCE= $(SL)/support_libraries
    37  O= $(OBJ_DIR)/simpleclient_obj
    38  INCLUDE=-I$(S) -I/usr/local/include -I$(GOOGLE_INCLUDE) -I$(SL) -I/usr/local/ssl/include -I/Domains/include \
    39  -I$(LIB_SOURCE)/tao_support -I$(LIB_SOURCE)/protos
    40  
    41  CFLAGS=-DOS_POSIX -O3 -g -Wall -std=c++11 -Wno-strict-aliasing -Wno-deprecated
    42  CFLAGS1=-DOS_POSIX -O1 -g -Wall -std=c++11
    43  
    44  CC=g++
    45  LINK=g++
    46  PROTO=protoc
    47  AR=ar
    48  export LD_LIBRARY_PATH=/usr/local/lib
    49  LDFLAGS_SHORT=-lprotobuf -lgtest -lgflags -lpthread -lssl -lglog -lcrypto
    50  LDFLAGS= -lprotobuf -lgtest -lgflags -lpthread -lcrypto -lssl -lchromium -lglog -lmodp
    51  
    52  #ifdef MAC_OS
    53  LIB_EXTRA_MAC=-L/usr/local/ssl/lib  -L$(LD_LIBRARY_PATH)
    54  #endif
    55  
    56  dobj_simpleclient=$(O)/taosupport.o $(O)/attestation.pb.o \
    57  	$(O)/agile_crypto_support.o $(O)/ssl_helpers.o  $(O)/taosupport.pb.o \
    58  	$(O)/messages.pb.o $(O)/domain_policy.pb.o $(O)/keys.pb.o $(O)/simpleclient_cc.o
    59  	#$(O)/datalog_guard.pb.o $(O)/acl_guard.pb.o \
    60  
    61  dobj_gen_keys=$(O)/helpers.o $(O)/messages.pb.o $(O)/gen_keys.o
    62  dobj_gen_keys_test=$(O)/helpers.o $(O)/messages.pb.o $(O)/gen_keys_test.o
    63  
    64  all:	$(EXE_DIR)/simpleclient_cc.exe
    65  
    66  clean:
    67  	@echo "removing object files"
    68  	rm $(O)/*.o
    69  	@echo "removing executable file"
    70  	rm $(EXE_DIR)/simpleclient_cc.exe
    71  
    72  $(EXE_DIR)/simpleclient_cc.exe: $(dobj_simpleclient)
    73  	@echo "linking simpleclient"
    74  	$(LINK) -o $(EXE_DIR)/simpleclient_cc.exe $(dobj_simpleclient) \
    75  	$(LIB_EXTRA_MAC) -L/Domains -lauth -ltao $(LDFLAGS)
    76  
    77  $(EXE_DIR)/simple_client_test.exe: $(dobj_simple_client)
    78  	@echo "linking simple_client_test"
    79  	$(LINK) -o $(EXE_DIR)/simple_client_test.exe $(dobj_simple_client) $(LIB_EXTRA_MAC) -L/Domains $(LDFLAGS_SHORT)
    80  
    81  $(O)/ssl_helpers.o: $(LIB_SOURCE)/tao_support/ssl_helpers.cc
    82  	@echo "compiling ssl_helpers.cc"
    83  	$(CC) $(CFLAGS) $(INCLUDE) -c -o $(O)/ssl_helpers.o $(LIB_SOURCE)/tao_support/ssl_helpers.cc
    84  
    85  $(O)/agile_crypto_support.o: $(LIB_SOURCE)/tao_support/agile_crypto_support.cc
    86  	@echo "compiling agile_crypto_support.cc"
    87  	$(CC) $(CFLAGS) $(INCLUDE) -c -o $(O)/agile_crypto_support.o $(LIB_SOURCE)/tao_support/agile_crypto_support.cc
    88  
    89  $(O)/domain_policy.pb.o: $(LIB_SOURCE)/protos/domain_policy.pb.cc
    90  	@echo "compiling domain_policy.pb.cc"
    91  	$(CC) $(CFLAGS) $(INCLUDE) -c -o $(O)/domain_policy.pb.o $(LIB_SOURCE)/protos/domain_policy.pb.cc
    92  
    93  $(O)/keys.pb.o: $(LIB_SOURCE)/protos/keys.pb.cc
    94  	@echo "compiling keys.pb.cc"
    95  	$(CC) $(CFLAGS) $(INCLUDE) -c -o $(O)/keys.pb.o $(LIB_SOURCE)/protos/keys.pb.cc
    96  
    97  $(O)/messages.pb.o: $(LIB_SOURCE)/protos/messages.pb.cc
    98  	@echo "compiling messages.pb.cc"
    99  	$(CC) $(CFLAGS) $(INCLUDE) -c -o $(O)/messages.pb.o $(LIB_SOURCE)/protos/messages.pb.cc
   100  
   101  $(O)/attestation.pb.o: $(LIB_SOURCE)/protos/attestation.pb.cc
   102  	@echo "compiling attestation.pb.cc"
   103  	$(CC) $(CFLAGS) $(INCLUDE) -c -o $(O)/attestation.pb.o $(LIB_SOURCE)/protos/attestation.pb.cc
   104  
   105  $(O)/datalog_guard.pb.o: $(LIB_SOURCE)/protos/datalog_guard.pb.cc
   106  	@echo "compiling datalog_guard.pb.cc"
   107  	$(CC) $(CFLAGS) $(INCLUDE) -c -o $(O)/datalog_guard.pb.o $(LIB_SOURCE)/protos/datalog_guard.pb.cc
   108  
   109  $(O)/acl_guard.pb.o: $(LIB_SOURCE)/protos/acl_guard.pb.cc
   110  	@echo "compiling acl_guard.pb.cc"
   111  	$(CC) $(CFLAGS) $(INCLUDE) -c -o $(O)/acl_guard.pb.o $(LIB_SOURCE)/protos/acl_guard.pb.cc
   112  
   113  $(O)/taosupport.o: $(LIB_SOURCE)/tao_support/taosupport.cc
   114  	@echo "compiling taosupport.cc"
   115  	$(CC) $(CFLAGS) $(INCLUDE) -c -o $(O)/taosupport.o $(LIB_SOURCE)/tao_support/taosupport.cc
   116  
   117  $(O)/taosupport.pb.o: $(LIB_SOURCE)/tao_support/taosupport.pb.cc
   118  	@echo "compiling taosupport.pb.cc"
   119  	$(CC) $(CFLAGS) $(INCLUDE) -c -o $(O)/taosupport.pb.o $(LIB_SOURCE)/tao_support/taosupport.pb.cc
   120  
   121  
   122  $(O)/simpleclient_cc.o: $(S)/simpleclient_cc.cc
   123  	@echo "compiling simpleclient_cc.cc"
   124  	$(CC) $(CFLAGS) $(INCLUDE) -c -o $(O)/simpleclient_cc.o $(S)/simpleclient_cc.cc
   125