Skip to content

Instantly share code, notes, and snippets.

@cognominal
Created May 13, 2024 12:45
Show Gist options
  • Save cognominal/fb7a9b262a8c68837d9480ced4d59de3 to your computer and use it in GitHub Desktop.
Save cognominal/fb7a9b262a8c68837d9480ced4d59de3 to your computer and use it in GitHub Desktop.
messing with Makefile generation for integrating HAMT as a MoarVM repr
.PHONY: clean test
SRCS := src/hamt/cache.c
# src/hamt/hamt.c \
# src/hamt/murmur3.c \
# src/hamt/uh.c \
# src/reprs/hamt-node.c
OBJS := $(SRCS:.c=%O%)
%%O%: %.c
%CC% -c %CCSHARED% %CCFLAGS% %CCOUT% $< -o $@
all: %DESTDIR%/resources/libraries/%hamt%
clean:
-rm %DESTDIR%/resources/libraries/%hamt% %DESTDIR%/*.o
%DESTDIR%/resources/libraries/%hamt%: $(OBJS)
%LD% %LDSHARED% %LDFLAGS% %LIBS%%LDOUT%%DESTDIR%/resources/libraries/%hamt% $<
test: all
prove -e "raku -Ilib" t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment