このケースは何度も開かれており、すべての回答を確認しましたが、実際には役に立ちませんでした。
誰かが私を助けてくれるかもしれないので、ここに投稿します。
私の作業アーキテクチャは次のとおりです。
| ( I'm Here )
+- matamzone.c
+- amountset.c
+- product.c
+- order.c
+- matamzone.h
+- amount.h
+- p.h
+- order.h
+- TEST-folder
+- amount_set_main.c
+- amount_set_main.h
+- amount_set_tests.c
+- amount_set_tests.h
makefile は、make amount_set を記述して amount_set_main.c の実行をサポートする必要があります。
私のメイクファイルコード:
CC = gcc
COMP_FLAGS = -std=c99 -Wall -pedantic-errors -Werror -DNDEBUG
COMP_NEW = -std=c99 -Wall -pedantic-errors -Werror -DNDEBUG /tests
OUR_FILES = amount_set.c matamazom.c order.c product.c matamazom_print.c
OUR_NFILES = amount_set_main.c amount_set_test.c
OBJS = amount_set.o matamazom.o order.o product.o matamazom_print.o
TEST_OBJS = amount_set_main.o amount_set_test.o
EXEC = matamazom.exe
TESTROOMEXE = amount_set
$(TESTROOMEXE) : $(TEST_OBJS)
$(CC) -o $@ $(COMP_FLAGS) $(TEST_OBJS) -L. -lmtm
matamazom.o: matamazom.c matamazom.h list.h product.h order.h amount_set.h matamazom_print.h
$(CC) -c $(COMP_FLAGS) $(OUR_FILES) $*.c
amount_set.o: amount_set.c amount_set.h
$(CC) -c $(COMP_FLAGS) $(OUR_FILES) $*.c
order.o: order.c order.h amount_set.h
$(CC) -c $(COMP_FLAGS) $(OUR_FILES) $*.c
product.o: product.c matamazom.h
$(CC) -c $(COMP_FLAGS) $(OUR_FILES) $*.c
matamazom_print.o: matamazom_print.c matamazom_print.h
$(CC) -c $(COMP_FLAGS) $(OUR_FILES) $*.c
amount_set_main.o: amount_set_main.c amount_set_tests.h test_utilities.h
$(CC) -c $(COMP_NEW) $(OUR_NFILES) $*.c
amount_set: amount_set_main.c amount_set_tests.h amount_set.h
$(CC) -o $@ $(COMP_NEW) $(TEST_OBJS) -L. -lmtm
amount_set_test.o: amount_set_tests.c amount_set_tests test_utilities.h ../amount_set.h
$(CC) -c $(COMP_NEW) $(OUR_NFILES) $*.c
clean:
rm -f $(OBJS) $(EXEC) $(TESTS) $(TEST_O)
何らかの理由で私は得る:
**make: *** No rule to make target `amount_set_main.c', needed by `amount_set_main.o'. Stop.**
どんな助けでも:(