Skip to content

Commit

Permalink
make: remove dylib target, fix spawn target
Browse files Browse the repository at this point in the history
  • Loading branch information
contrun committed Oct 19, 2023
1 parent 3042b5c commit 5411502
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Makefile.clang
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ DOCKER_EXTRA_FLAGS ?=
BUILDER_DOCKER := nervos/ckb-riscv-gnu-toolchain@sha256:aae8a3f79705f67d505d1f1d5ddc694a4fd537ed1c7e9622420a470d59ba2ec3
PORT ?= 9999

all: lualib/liblua.a build/lua-loader build/libckblua.so build/dylibtest build/dylibexample build/spawnexample
all: lualib/liblua.a build/lua-loader build/spawnexample

all-via-docker:
docker run --rm -v `pwd`:/code ${BUILDER_DOCKER} bash -c "cd /code && make"
Expand All @@ -48,14 +48,13 @@ build/stdlib.o: include/ckb-c-stdlib/libc/src/impl.c
lualib/liblua.a:
make -C lualib -f Makefile.clang liblua.a

build/dylibtest: tests/test_cases/dylibtest.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(shell $(CC) --print-search-dirs | sed -n '/install:/p' | sed 's/install:\s*//g')libgcc.a

build/dylibexample: examples/dylib.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(shell $(CC) --print-search-dirs | sed -n '/install:/p' | sed 's/install:\s*//g')libgcc.a
build/spawnexample.o: examples/spawn.c
$(CC) -c $(CFLAGS) -o $@ $<

build/spawnexample: examples/spawn.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(shell $(CC) --print-search-dirs | sed -n '/install:/p' | sed 's/install:\s*//g')libgcc.a
build/spawnexample: build/spawnexample.o build/stdlib.o deps/compiler-rt-builtins-riscv/build/libcompiler-rt.a
$(LD) $(LDFLAGS) -o $@ $^
cp $@ [email protected]
$(OBJCOPY) --strip-debug --strip-all $@

build/lua-loader.o: lua-loader/lua-loader.c
$(CC) -c $(CFLAGS) -o $@ $<
Expand Down

0 comments on commit 5411502

Please sign in to comment.