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/simple_make/code/Makefile
Simon Newton ed3db61a55 Fix the simple_make example so that it works on Mac & Linux (#339)
Fix the simple_make example so that it works on Mac and Debian and add it to Mac tests.
2019-11-26 19:13:54 +01:00

11 lines
331 B
Makefile

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 -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