subsystem:
cd subdir && $(MAKE)
subsystem:
$(MAKE) -C subdir
make -f $(CURDIR)/subdir/Makefile
$ ll
total 12
-rw-rw-r--. 1 beyes beyes 73 May 17 00:15 hello.c
-rw-rw-r--. 1 beyes beyes 169 May 17 13:47 Makefile
drwxrwxr-x. 2 beyes beyes 4096 May 17 13:27 submake
$ ll submake/
total 4
-rw-rw-r--. 1 beyes beyes 47 May 17 13:27 Makefile
MAKEFLAGS += -rR
hello : hello.o
#make -f $(CURDIR)/submake/Makefile
cd $(CURDIR)/submake && make
gcc -o hello hello.o
hello.o : hello.c
gcc -c hello.c -o hello.o
all:
@echo $(MAKEFLAGS)
[beyes@SLinux temp8]$ make
gcc -c hello.c -o hello.o
cd /home/beyes/Makefile/temp8/submake && make
make[1]: Entering directory `/home/beyes/Makefile/temp8/submake'
wRr
make[1]: Leaving directory `/home/beyes/Makefile/temp8/submake'
gcc -o hello hello.o
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |