Skip to content
Snippets Groups Projects
Commit ae137dbc authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Prepare for cross compiled openlibm

parent d9e4622f
No related branches found
No related tags found
No related merge requests found
TARGET?=
BUILD=target/debug
ifneq ($(TARGET),)
BUILD=target/$(TARGET)/debug
CARGOFLAGS+="--target=$(TARGET)"
CC=$(TARGET)-gcc
endif
.PHONY: all clean fmt test .PHONY: all clean fmt test
all: openlibm/libopenlibm.a target/debug/libc.a target/debug/libcrt0.a all: $(BUILD)/libc.a $(BUILD)/libcrt0.a $(BUILD)/openlibm/libopenlibm.a
cargo build
clean: clean:
cargo clean cargo clean
make -C openlibm clean
make -C tests clean make -C tests clean
fmt: fmt:
./fmt.sh ./fmt.sh
test: openlibm/libopenlibm.a test: all
make -C tests run make -C tests run
target/debug/libc.a: $(BUILD)/libc.a:
cargo build cargo build $(CARGOFLAGS)
$(BUILD)/libcrt0.a:
cargo build --manifest-path src/crt0/Cargo.toml $(CARGOFLAGS)
target/debug/libcrt0.a: $(BUILD)/openlibm: openlibm
cargo build --manifest-path src/crt0/Cargo.toml rm -rf $@ $@.partial
cp -r $< $@.partial
mv $@.partial $@
openlibm/libopenlibm.a: $(BUILD)/openlibm/libopenlibm.a: $(BUILD)/openlibm
CFLAGS=-fno-stack-protector make -C openlibm libopenlibm.a CC=$(CC) CFLAGS=-fno-stack-protector make -C $< libopenlibm.a
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment