2
0
Fork 0
mirror of https://github.com/bazel-contrib/rules_foreign_cc synced 2024-12-04 08:02:31 +00:00
rules_foreign_cc/examples/make_simple/code/Makefile

11 lines
342 B
Makefile
Raw Normal View History

BUILD_DIR=build-out
default all $(BUILD_DIR)/lib/liba.a: liba.cpp liba.h
rm -rf $(BUILD_DIR)/lib
mkdir -p $(BUILD_DIR)/lib
$(CLANG_WRAPPER) -fPIC -o $(BUILD_DIR)/lib/liba.o -c liba.cpp
ar rcs $(BUILD_DIR)/lib/liba.a $(BUILD_DIR)/lib/liba.o
install: $(BUILD_DIR)/lib/liba.a
cp -rv $(BUILD_DIR)/lib $(PREFIX)
cp liba.h $(PREFIX)/include