2023-02-09 13:26:01 +01:00
|
|
|
# The following shows how to use a library that is not installed.
|
|
|
|
# Usage example: make LIBPATH=/tmp/libipc/zig-out/lib/ build run
|
|
|
|
|
|
|
|
LIBPATH ?=
|
|
|
|
LD_LIBRARY_PATH=LD_LIBRARY_PATH=$(LIBPATH)
|
|
|
|
CRYSTAL_LIBRARY_PATH=CRYSTAL_LIBRARY_PATH=$(LIBPATH)
|
|
|
|
CRYSTAL_BUILD_OPTIONS ?=
|
|
|
|
CRYSTAL_BUILD_OPTIONS += $(CRYSTAL_STATIC_BUILD)
|
|
|
|
|
|
|
|
LIBIPC_RUNDIR ?= /tmp/libipc-run
|
|
|
|
|
2023-05-14 14:39:30 +02:00
|
|
|
all: run
|
|
|
|
build: build-pongd build-pong build-input2ipc build-fromipc
|
2023-02-09 13:26:01 +01:00
|
|
|
run: run-pongd
|
|
|
|
|
|
|
|
include ../mk/makefile.utils
|
|
|
|
|
|
|
|
build-pongd:
|
|
|
|
$(CRYSTAL_LIBRARY_PATH) shards build pongd $(CRYSTAL_BUILD_OPTIONS)
|
|
|
|
|
|
|
|
run-pongd:
|
|
|
|
rm $(LIBIPC_RUNDIR)/pong 2>/dev/null || true
|
|
|
|
$(LD_LIBRARY_PATH) ./bin/pongd
|
|
|
|
|
|
|
|
build-pong:
|
|
|
|
$(CRYSTAL_LIBRARY_PATH) shards build pong $(CRYSTAL_BUILD_OPTIONS)
|
|
|
|
|
|
|
|
run-pong:
|
|
|
|
$(LD_LIBRARY_PATH) ./bin/pong
|
2023-05-14 14:39:30 +02:00
|
|
|
|
|
|
|
-include makefile.user
|
|
|
|
|
|
|
|
build-input2ipc:
|
|
|
|
$(CRYSTAL_LIBRARY_PATH) shards build input2ipc $(CRYSTAL_BUILD_OPTIONS)
|
|
|
|
|
|
|
|
build-fromipc:
|
|
|
|
$(CRYSTAL_LIBRARY_PATH) shards build fromipc $(CRYSTAL_BUILD_OPTIONS)
|