build: simplify rules for metal

Signed-off-by: Aman Karmani <aman@tmm1.net>
pull/378/head
Zhao Zhili 3 years ago committed by Aman Karmani
parent 3c56b9c597
commit 35420ab7fd
  1. 6
      ffbuild/common.mak

@ -113,13 +113,13 @@ $(BIN2CEXE): ffbuild/bin2c_host.o
$(HOSTLD) $(HOSTLDFLAGS) $(HOSTLD_O) $^ $(HOSTEXTRALIBS) $(HOSTLD) $(HOSTLDFLAGS) $(HOSTLD_O) $^ $(HOSTEXTRALIBS)
%.metal.air: %.metal %.metal.air: %.metal
$(METALCC) $(patsubst $(SRC_PATH)/%,$(SRC_LINK)/%,$<) -o $@ $(METALCC) $< -o $@
%.metallib: %.metal.air %.metallib: %.metal.air
$(METALLIB) --split-module-without-linking $(patsubst $(SRC_PATH)/%,$(SRC_LINK)/%,$<) -o $@ $(METALLIB) --split-module-without-linking $< -o $@
%.metallib.c: %.metallib $(BIN2CEXE) %.metallib.c: %.metallib $(BIN2CEXE)
$(BIN2C) $(patsubst $(SRC_PATH)/%,$(SRC_LINK)/%,$<) $@ $(subst .,_,$(basename $(notdir $@))) $(BIN2C) $< $@ $(subst .,_,$(basename $(notdir $@)))
%.ptx: %.cu $(SRC_PATH)/compat/cuda/cuda_runtime.h %.ptx: %.cu $(SRC_PATH)/compat/cuda/cuda_runtime.h
$(COMPILE_NVCC) $(COMPILE_NVCC)

Loading…
Cancel
Save