diff --git a/.gitignore b/.gitignore index 48d7b4a..072831b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,7 @@ bin/ *.bin *.o *.code-workspace -tests/cmocka/ +tests/build/ tests/bin/ tests/obj/ out/ diff --git a/Dockerfile b/Dockerfile index 02daa80..d6cc2ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,9 +11,6 @@ RUN apt-get -y update && \ unzip && \ git config --global --add safe.directory "*" WORKDIR /app -COPY tests/cmocka-*.tar.xz /app/tests/ -COPY tests/Makefile /app/tests/Makefile -RUN make -C tests cmocka COPY . /app EXPOSE 2345 ENTRYPOINT [] diff --git a/tests/Makefile b/tests/Makefile index 71f898f..e21dd1e 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -5,7 +5,7 @@ SGDK?=/sgdk BIN_DIR=bin OBJ_DIR=obj CMOCKA_TAR=third_party/cmocka-1.1.7.tar.xz -CMOCKA_DIR=cmocka +CMOCKA_DIR=build/deps/cmocka ifeq ($(DEBUG),1) GDB=gdbserver :2345 @@ -233,7 +233,7 @@ system: $(SYSTEM_TESTS_TARGET) $(GDB) ./$(SYSTEM_TESTS_TARGET) .PHONY: system -$(OBJ_DIR)/%.o: %.c +$(OBJ_DIR)/%.o: %.c | $(CMOCKA_DIR) @mkdir -p $(dir $@) $(CC) $(CFLAGS) -MMD -MT "$@ $(basename $@).d" -c $< -o $@ @@ -258,5 +258,5 @@ clean-target: .PHONY: clean-target clean: clean-target - rm -rf $(CMOCKA_DIR) + rm -rf build/ .PHONY: clean