diff options
author | johannst <johannes.stoelp@gmail.com> | 2020-09-29 20:55:25 +0200 |
---|---|---|
committer | johannst <johannes.stoelp@gmail.com> | 2020-09-29 20:55:25 +0200 |
commit | 048c106ca08b136443f2265922d15cfc8dd1495b (patch) | |
tree | 247e8f78185d87d40edf84cca34f6a64f2db6ac3 | |
parent | a77ec1a9e7b307915e485ae26296c8c7f98a321c (diff) | |
download | matcha-threads-048c106ca08b136443f2265922d15cfc8dd1495b.tar.gz matcha-threads-048c106ca08b136443f2265922d15cfc8dd1495b.zip |
add own demo1 run target + replace use make variables
-rw-r--r-- | Makefile | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -20,26 +20,28 @@ fmt: example/demo1: example/demo1.o lib/libmatcha.a $(CXX) -o $@ $^ $(LDFLAGS) + +demo1: example/demo1 ifeq ($(ARCH),arm64) qemu-aarch64 \ -L /usr/aarch64-linux-gnu \ -E LD_LIBRARY_PATH=/usr/aarch64-linux-gnu/lib \ - example/demo1 + $< else - example/demo1 + $< endif -gdb: example/demo1 +demo1-gdb: example/demo1 ifeq ($(ARCH),arm64) qemu-aarch64 \ -L /usr/aarch64-linux-gnu \ -E LD_LIBRARY_PATH=/usr/aarch64-linux-gnu/lib \ -g 1234 \ - example/demo1 & - gdb-multiarch -ex 'target remote :1234' -ex 'b main' -ex 'c' example/demo1 + $< & + gdb-multiarch -ex 'target remote :1234' -ex 'b main' -ex 'c' $< else - which cgdb && cgdb -x util.gdb -ex 'start' example/demo1 \ - || gdb -x util.gdb -ex 'start' example/demo1 + which cgdb && cgdb --ex 'start' $< \ + || gdb --ex 'start' $< endif docker: docker/Dockerfile @@ -48,7 +50,6 @@ docker: docker/Dockerfile docker run -it --rm -v $(PWD):/develop $(IMG):latest .PHONY: docker - clean: make -C lib clean rm -f example/demo1 example/demo1.o |