diff options
Diffstat (limited to 'tools/image/Makefile')
-rw-r--r-- | tools/image/Makefile | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tools/image/Makefile b/tools/image/Makefile index 9a015590..b946acd4 100644 --- a/tools/image/Makefile +++ b/tools/image/Makefile @@ -20,6 +20,9 @@ $(warning CTEPATH not defined; defaulting to awd) CTEPATH = /afs/awd/projects/cte endif +P9_XIP_SRCDIR = $(abspath ../../import/chips/p9/xip) +P9_XIP_BINDIR = $(P9_XIP_SRCDIR)/bin + # Locations of required headers. INCLUDES += -I. -I../../ -I../../utils INCLUDES += -I ../../sbe/image/ @@ -34,6 +37,7 @@ INCLUDES += -I ../../pk/std/ INCLUDES += -I ../../pk/trace/ INCLUDES += -I ../../tools/ppetracepp/ INCLUDES += -I ../../import/hwpf/fapi2/include/ +INCLUDES += -I ../../import/chips/p9/xip/ # Under Linux the scheme is to use a common compiler to create procedures. # However, the common compiler can be VERY slow, so if the system compiler is @@ -57,10 +61,9 @@ CC = gcc CXX = g++ endif -#UTILITIES-SOURCES += ../../sbe/image/sbe_xip_image.c -UTILITIES-SOURCES = sbe_xip_tool.c sbe_default_tool.c +UTILITIES-SOURCES = sbe_default_tool.c -UTILITIES = sbe_xip_tool sbe_default_tool +UTILITIES = sbe_default_tool # Utility targets UTILITIES-OBJc = $(patsubst %.c,bin/%.o,$(UTILITIES-SOURCES)) @@ -75,21 +78,18 @@ utilities: buildBinDir $(UTILITIES-EXECUTABLES) buildBinDir: mkdir -p bin -bin/%.o: %.c - $(CXX) -std=c++11 $(INCLUDES) $(CXXFLAGS) -DDEBUG_SBE_XIP_IMAGE=1 -DFAPI2_NO_FFDC -c -o $@ $< +# Build the P9-XIP image code +$(P9_XIP_BINDIR)/p9_xip_image.o: + $(MAKE) -I $(P9_XIP_SRCDIR) -C $(P9_XIP_SRCDIR) -f Makefile -bin/sbe_xip_image.o: ../../sbe/image/sbe_xip_image.c +bin/%.o: %.c $(CXX) -std=c++11 $(INCLUDES) $(CXXFLAGS) -DDEBUG_SBE_XIP_IMAGE=1 -DFAPI2_NO_FFDC -c -o $@ $< -bin/sbe_xip_tool: bin/sbe_xip_image.o bin/p9_ring_identification.o bin/sbe_xip_tool.o - $(CXX) $(CXXFLAGS) ${INCLUDES} -o $@ $^ - ln -sf bin/sbe_xip_tool sbe_xip_tool - -bin/sbe_default_tool: bin/sbe_xip_image.o bin/sbe_default_tool.o +bin/sbe_default_tool: $(P9_XIP_BINDIR)/p9_xip_image.o bin/sbe_default_tool.o $(CXX) $(CXXFLAGS) ${INCLUDES} -o $@ $^ ln -sf bin/sbe_default_tool sbe_default_tool clean: - rm -f sbe_xip_tool sbe_default_tool + rm -f sbe_default_tool rm -rf bin mkdir -p bin |