我有一个包含此内容的 Makefile
$ cat Makefile
all: locality
locality: src/locality.o
g++ src/locality.o -o locality
locality.o: src/locality.cpp
g++ -O3 -c src/locality.cpp
clean:
rm -rf src/*.o locality
但是,当我运行时make
,我看到一些稍微不同的输出!
$ make clean
rm -rf src/*.o locality
$ make
g++ -c -o src/locality.o src/locality.cpp
g++ src/locality.o -o locality
那么在哪里-O3
??