- 论坛徽章:
- 0
|
- # test
- RSC1_PATH = ./makefile2/APP1/Source/
- RSC2_PATH = ./makefile2/APP2/Source/
- RSC3_PATH = ./makefile2/APP3/Source/
- RSC4_PATH = ./makefile2/APP4/Source/
- RSC5_PATH = ./makefile2/APP5/Source/
- OBJ_PATH = ./makefile2/Objs/
- Module += $(OBJ_PATH)app1Main.obj $(OBJ_PATH)app2Main.obj $(OBJ_PATH)app3Main.obj $(OBJ_PATH)app4Main.obj $(OBJ_PATH)app5Main.obj
- vpath %.c $(RSC1_PATH) $(RSC2_PATH) $(RSC3_PATH) $(RSC4_PATH) $(RSC5_PATH)
- vpath %.obj $(OBJ_PATH)
- .SUFFIXES :
- .SUFFIXES : .obj .c .h .cpp
- .PHONY : update
- update : $(Module)
- .c.obj:
- gcc -o $(OBJ_PATH)$@ -c $<
复制代码 这个文件保存成 mymakefile.mak
然后运行 make -f mymakefile.mak update ....
每次的提示如下:
make: *** No rule to make target `makefile2/Objs/app1Main.obj', needed by `updat
e'. Stop.
这个后缀规则时这样用么? 为何不行呢? |
|