Skip to content

Commit

Permalink
Simplify Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
rhargreaves committed Sep 8, 2024
1 parent 83a16f2 commit bf7de7d
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -237,24 +237,17 @@ system: $(SYSTEM_TESTS_TARGET)
$(GDB) ./$(SYSTEM_TESTS_TARGET)
.PHONY: system

$(OBJ_DIR):
mkdir -p $(dir $@)

$(OBJ_DIR)/%.o: %.c
mkdir -p $(dir $@)
$(CC) $(CFLAGS) -MMD -c $< -o $@

$(OBJ_DIR)/%.o: %.c
mkdir -p $(dir $@)
$(CC) $(CFLAGS) -MMD -c $< -o $@

$(UNIT_TESTS_TARGET): $(SRC_OBJ) $(UNIT_TEST_OBJ) $(COMMON_TEST_OBJ)
mkdir -p $(dir $@)
$(CC) -MMD -o $@ $^ $(UNIT_TEST_LDFLAGS)
$(CC) -o $@ $^ $(UNIT_TEST_LDFLAGS)

$(SYSTEM_TESTS_TARGET): $(SRC_OBJ) $(SYSTEM_TEST_OBJ) $(COMMON_TEST_OBJ)
mkdir -p $(dir $@)
$(CC) -MMD -o $@ $^ $(SYSTEM_TEST_LDFLAGS)
$(CC) -o $@ $^ $(SYSTEM_TEST_LDFLAGS)

$(CMOCKA_DIR):
mkdir -p $@
Expand Down

0 comments on commit bf7de7d

Please sign in to comment.