github.com/jlmucb/cloudproxy@v0.0.0-20170830161738-b5aa0b619bc4/cpvmm/vmm/test/vmmentrytest.mak (about) 1 ############################################################################# 2 # Copyright (c) 2013 Intel Corporation 3 # 4 # Author: John Manferdelli from previous eVMM makefiles 5 # 6 # Licensed under the Apache License, Version 2.0 (the "License"); 7 # you may not use this file except in compliance with the License. 8 # You may obtain a copy of the License at 9 # 10 # http://www.apache.org/licenses/LICENSE-2.0 11 # 12 # Unless required by applicable law or agreed to in writing, software 13 # distributed under the License is distributed on an "AS IS" BASIS, 14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 # See the License for the specific language governing permissions and 16 # limitations under the License. 17 ############################################################################# 18 19 ifndef CPProgramDirectory 20 E= /home/jlm/jlmcrypt 21 else 22 E= $(CPProgramDirectory) 23 endif 24 ifndef VMSourceDirectory 25 S= /home/jlm/fpDev/fileProxy/cpvmm 26 else 27 S= $(VMSourceDirectory) 28 endif 29 ifndef TARGET_MACHINE_TYPE 30 TARGET_MACHINE_TYPE= x64 31 endif 32 33 mainsrc= $(S)/vmm 34 35 B= $(E)/vmmobjects/test 36 INCLUDES= -I$(S)/vmm -I$(S)/common/include -I$(S)/vmm/include -I../bootstrap 37 38 DEBUG_CFLAGS:= -Wall -Wextra -fwrapv -std=c99 -Wno-format -g -DDEBUG -D PRINTMUTEX64 -D INCLUDE_LAYERING -nostartfiles -nostdlib -fno-tree-loop-distribute-patterns -nodefaultlibs -fno-tree-loop-distribute-patterns -fPIE 39 RELEASE_CFLAGS:= -Wall -Wextra -fwrapv -std=c99 -Wno-unknown-pragmas -Wno-format -O3 -Wunused-function -D PRINTMUTEX64 -D INCLUDE_LAYERING -nostartfiles -nostdlib -fno-tree-loop-distribute-patterns -nodefaultlibs -fno-tree-loop-distribute-patterns -fPIE 40 CFLAGS= $(RELEASE_CFLAGS) 41 LDFLAGS= 42 43 CC= gcc 44 LINK= gcc 45 LIBMAKER= ar 46 47 dobjs= $(B)/bootstrap_string.o $(B)/bootstrap_print.o $(B)/vmmstub.o 48 49 all: $(E)/evmm.bin 50 51 $(E)/evmm.bin: $(dobjs) 52 @echo "evmm.bin" 53 $(LINK) -o $(E)/evmm.bin -static -nostdlib -fno-tree-loop-distribute-patterns -T ../evmm.script -fPIE -e vmm_main $(dobjs) 54 55 $(B)/vmmstub.o: $(mainsrc)/test/vmmstub.c 56 echo "vmmstub.o" 57 $(CC) $(CFLAGS) $(INCLUDES) -c -o $(B)/vmmstub.o $(mainsrc)/test/vmmstub.c 58 59 $(B)/bootstrap_print.o: $(mainsrc)/bootstrap/bootstrap_print.c 60 $(CC) $(CFLAGS) $(INCLUDES) -fno-stack-protector -c -o $(B)/bootstrap_print.o $(mainsrc)/bootstrap/bootstrap_print.c 61 62 $(B)/bootstrap_string.o: $(mainsrc)/bootstrap/bootstrap_string.c 63 $(CC) $(CFLAGS) $(INCLUDES) -fno-stack-protector -c -o $(B)/bootstrap_string.o $(mainsrc)/bootstrap/bootstrap_string.c 64 65 66 clean: 67 rm -f $(E)/evmm.bin 68 rm -f $(E)/vmmobjects/test/*.o