2024-06-28 04:02:26 +00:00
|
|
|
COSMOCC ?= ${HOME}/Downloads/cosmocc/bin/cosmocc
|
|
|
|
|
|
|
|
OBJDIR = objdir
|
|
|
|
OUTDIR = out
|
|
|
|
|
|
|
|
SOURCES = \
|
|
|
|
../src/main.c \
|
2024-06-28 04:54:38 +00:00
|
|
|
../src/parser.c \
|
2024-07-02 05:25:01 +00:00
|
|
|
../src/helpers.c \
|
2024-06-28 10:35:06 +00:00
|
|
|
../src/algorithms/linear_congruential_gen.c \
|
2024-06-28 08:31:34 +00:00
|
|
|
../src/data_structures/linked_list.c \
|
2024-06-30 06:32:17 +00:00
|
|
|
../src/data_structures/hash_map.c \
|
|
|
|
../src/data_structures/priority_heap.c
|
2024-06-28 04:02:26 +00:00
|
|
|
|
|
|
|
HEADERS = \
|
2024-06-28 04:54:38 +00:00
|
|
|
../src/parser.h \
|
2024-07-01 06:13:06 +00:00
|
|
|
../src/parser_internal.h \
|
2024-07-02 05:25:01 +00:00
|
|
|
../src/helpers.h \
|
2024-06-28 10:35:06 +00:00
|
|
|
../src/algorithms/linear_congruential_gen.h \
|
2024-06-28 08:31:34 +00:00
|
|
|
../src/data_structures/linked_list.h \
|
2024-06-29 07:52:17 +00:00
|
|
|
../src/data_structures/hash_map.h \
|
2024-06-30 06:32:17 +00:00
|
|
|
../src/data_structures/priority_heap.h \
|
2024-06-29 07:52:17 +00:00
|
|
|
../src/platforms.h
|
2024-06-28 04:02:26 +00:00
|
|
|
|
|
|
|
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 $@ $<
|