Stephen Seo
4d260e4a7b
Also implemented the linear congruential generator algorithm for generating hash values for the hash_map. Tweaks to linked_list api to support "check functions" with supplied user data.
35 lines
774 B
Makefile
35 lines
774 B
Makefile
COSMOCC ?= ${HOME}/Downloads/cosmocc/bin/cosmocc
|
|
|
|
OBJDIR = objdir
|
|
OUTDIR = out
|
|
|
|
SOURCES = \
|
|
../src/main.c \
|
|
../src/parser.c \
|
|
../src/data_structures/linked_list.c \
|
|
../src/data_structures/hash_map.c
|
|
|
|
HEADERS = \
|
|
../src/parser.h \
|
|
../src/data_structures/linked_list.h \
|
|
../src/data_structures/hash_map.h
|
|
|
|
OBJECTS = $(addprefix ${OBJDIR}/,$(subst ..,PREVDIR,$(patsubst %.c,%.c.o,${SOURCES})))
|
|
|
|
all: actually_portable_simplearchiver
|
|
|
|
actually_portable_simplearchiver: ${OBJECTS}
|
|
@mkdir -p "${OUTDIR}"
|
|
${COSMOCC} -o "${OUTDIR}/actually_portable_simplearchiver" $^
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
rm -rf "${OUTDIR}"
|
|
rm -rf "${OBJDIR}"
|
|
|
|
.SECONDEXPANSION:
|
|
|
|
${OBJDIR}/%.c.o: $$(subst PREVDIR,..,%.c) ${HEADERS}
|
|
@mkdir -p "$(dir $@)"
|
|
${COSMOCC} -c ${OTHER_FLAGS} -o $@ $<
|