Files
rocm-systems/samples/0_Intro/bit_extract/Makefile
T
Tao Sang da27fd2b09 Solve issues with hip-vdi runtime static lib
1.Combine libamdhip64_static_base.a and libamdvdi_static.a into libamdhip64_static.a.
2.Let hipcc use -use-staticlib to link libamdhip64_static.a.
3.Add some samples for static lib.
4.Fix compiling failure of code object.

Change-Id: Ic8c95228eb139058da8b5d66ba8439486154ca6f
2020-04-20 15:37:02 -04:00

28 lines
640 B
Makefile

#Dependencies : [MYHIP]/bin must be in user's path.
HIP_PATH?= $(wildcard /opt/rocm/hip)
ifeq (,$(HIP_PATH))
HIP_PATH=../../..
endif
HIP_PLATFORM=$(shell $(HIP_PATH)/bin/hipconfig --platform)
HIPCC=$(HIP_PATH)/bin/hipcc
# Show how to use PLATFORM to specify different options for each compiler:
ifeq (${HIP_PLATFORM}, nvcc)
HIPCC_FLAGS = -gencode=arch=compute_20,code=sm_20
endif
EXE=bit_extract
EXE_STATIC=bit_extract_static
$(EXE): bit_extract.cpp
$(HIPCC) $(HIPCC_FLAGS) $< -o $@
$(EXE_STATIC): bit_extract.cpp
$(HIPCC) -use-staticlib $(HIPCC_FLAGS) $< -o $@
all: $(EXE) $(EXE_STATIC)
clean:
rm -f *.o $(EXE) $(EXE_STATIC)