Skip to content

Commit

Permalink
fix to makefile for repl
Browse files Browse the repository at this point in the history
  • Loading branch information
RS2007 committed Jun 13, 2023
1 parent c032ffd commit 37d8525
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ HEADERS = $(wildcard $(SRC_FOLDER)/*.h)
TESTS = $(wildcard $(TEST_FOLDER)/*.c)
SOURCES_WITHOUT_REPL_EVALUATOR_OBJECT = $(shell find ./src -type f -name '*.c' ! -name 'repl.c' ! -name 'evaluator.c' ! -name 'object.c')
SOURCES_WITHOUT_MAIN = $(shell find ./src -type f -name '*.c' ! -name 'main.c' ! -name 'parser.c')
SOURCES_FOR_REPL = $(shell find ./src -type f -name '*.c' ! -name 'main.c')
SOURCES_WITHOUT_MAIN_REPL = $(shell find ./src -type f -name '*.c' ! -name 'main.c' ! -name 'repl.c')
BIN = $(wildcard $(BIN_FOLDER)/*)

Expand All @@ -22,7 +23,7 @@ compile: $(SOURCES_HEADERS)
$(CC) -o ./bin/mc $(SOURCES_WITHOUT_REPL) $(C_FLAGS)

repl: $(SOURCES_HEADERS)
$(CC) -o ./bin/repl $(SOURCES_WITHOUT_MAIN) $(C_FLAGS) && ./bin/repl
$(CC) -o ./bin/repl $(SOURCES_FOR_REPL) $(C_FLAGS) && ./bin/repl

test : $(SOURCES_HEADERS) $(TESTS)
$(CC) -o ./bin/${name}_test ${TEST_FOLDER}/${name}_test.c ${SOURCES_WITHOUT_MAIN_REPL} ${C_FLAGS} && ./bin/${name}_test
Expand Down

0 comments on commit 37d8525

Please sign in to comment.