add lommereimar to makefile

This commit is contained in:
SimonFJ20 2023-04-19 23:43:59 +02:00
parent 9891638d1e
commit dc7aee91ce

View File

@ -12,7 +12,7 @@ CFLAGS = \
# CFLAGS += -O3
CFLAGS += -g
all: compile_flags.txt dirs scirpt
all: compile_flags.txt dirs scirpt lommereimar
COMMON_SRC = string.c stringmap.c
COMMON_OBJ = $(patsubst %.c, build/common/%.o, $(COMMON_SRC))
@ -23,6 +23,12 @@ SCIRPT_OBJ = $(patsubst %.c, build/scirpt/%.o, $(SCIRPT_SRC))
scirpt: $(SCIRPT_OBJ) $(COMMON_OBJ)
$(CC) -o bin/$@ $(CFLAGS) $^ -lm
LOMMEREIMAR_SRC = calculator.c
LOMMEREIMAR_OBJ = $(patsubst %.c, build/lommereimar/%.o, $(LOMMEREIMAR_SRC))
lommereimar: $(LOMMEREIMAR_OBJ) $(COMMON_OBJ)
$(CC) -o bin/$@ $(CFLAGS) $^ -lm
build/%.o: %.c $(shell find -name *.h)
mkdir $(@D) -p
$(CC) -c -o $@ $(CFLAGS) $<