Obsolete
/
libipc-old
Archived
3
0
Fork 0
This repository has been archived on 2024-06-18. You can view files and clone it, but cannot push or open issues/pull-requests.
libipc-old/zig-impl/drop/Makefile

39 lines
845 B
Makefile
Raw Normal View History

ZIGC=zig
CC=gcc
CFLAGS=-Wall -Wextra
LDFLAGS=-I build/ -L build/ -lipc
all: zigcompilation compilation
ifeq ($(SRC),)
test-src:
@echo SRC must be set via command line.
@exit 1
else
test-src:
endif
list-obj-files: test-src
@# List all .o included in a .a archive.
ar t $(SRC)
list-symbols: test-src
@# List all symbols in a .so.
nm -D $(SRC)
list-symbols-alt: test-src
@# Alternative: grep .text section in an objdump output.
objdump -T $(SRC) | grep text
zigcompilation: build.zig src/*.zig
$(ZIGC) build
compilation: src/main.c
@echo the following compilation will produce errors despite actually working
$(CC) -o main build/libipc.so $(CFLAGS) $^ $(LDFLAGS)
run:
LD_LIBRARY_PATH=build ./main
valgrind:
LD_LIBRARY_PATH=build valgrind --suppressions=./suppress-stuff.suppr --gen-suppressions=all -v --leak-check=full ./main