Ubuntu下make后为什么没有生成可执行文件
我的Makefile文件如下:
#Local Distance Protection
objects: main.o Read_SampleValues.o Sample.o Calculate.o Calculate_Lib.o Constant.o Relay.o Relay_Start.o Relay_PhSelector.o Relay_Distance.o Relay_Trip.o
ldp: $(objects)
cc -o ldp $(objects)
main.o: main.c Read_SampleValues.h Sample.h Calculate.h Calculate_Lib.h Relay.h Relay_Start.h Relay_PhSelector.h Relay_Distance.h Relay_Trip.h DataType.h
cc -c main.c
Read_SampleValues.o: Read_SampleValues.h DataType.h
Sample.o: Sample.h Read_SampleValues.h DataType.h
Calculate.o: Calculate.h Calculate_Lib.h Constant.h DataType.h Sample.h
Calculate_Lib.o: Calculate.h Calculate_Lib.h DataType.h Sample.h
Constant.o: Constant.c Constant.h DataType.h
cc -c Constant.c -lm
Relay.o: Calculate.h Constant.h Relay.h Relay_Start.h Relay_PhSelector.h Relay_Distance.h Relay_Trip.h
Relay_Start.o: Calculate.h Constant.h Relay.h Relay_Start.h Relay_PhSelector.h Relay_Distance.h Relay_Trip.h Calculate_Lib.h DataType.h
Relay_PhSelector.o: Calculate.h Constant.h Relay.h Relay_Start.h Relay_PhSelector.h Relay_Distance.h Calculate_Lib.h
Relay_Distance.o: Calculate.h Constant.h Relay.h Relay_Start.h Relay_PhSelector.h Relay_Distance.h Calculate_Lib.h
Relay_Trip.o: Calculate.h Constant.h Relay.h Relay_Start.h Relay_PhSelector.h Relay_Distance.h Relay_Trip.h Calculate_Lib.h DataType.h
.PHONY: clean
clean:
-rm ldp $(objects)
make后没有错误,只有一些warnings, 但是./ldp却显示bash: ./ldp: No such file or directory
是为什么啊
------解决方案--------------------
objects=main.o Read_SampleValues.o
这样呢?
------解决方案--------------------