(INCL)=../vhalWhy does it think that there is nothing after the -I argument? Once upon a time, I would have made milltop dependent on milltop.c, vhal.h, and parseargs.o but I am not seeing the %.o: %.c dependency rules in example Makefiles.
CC=gcc
DEPS=../vhal/vhal.h ../vhal/parseargs.c
all: milltop ../vhal/parseargs.c $(INCL)vhal.h milltop.ngc
milltop: milltop.c $(DEPS)
$(CC) -o $@ -g milltop.c -I$(INCL)
milltop.ngc: milltop
./milltop -mr0.25 -pt3.203 -f3.0 -w0.522 -l3.055 -h2.686 -mof 0.25 >milltop.ngc
Conservative. Idaho. Software engineer. Historian. Trying to prevent Idiocracy from becoming a documentary.
Email complaints/requests about copyright infringement to clayton @ claytoncramer.com. Reminder: the last copyright troll that bothered me went bankrupt.
"And we know that all things work together for good to them that love God, to them who are the called according to his purpose." -- Rom. 8:28Thursday, August 27, 2015
Fun With Makefiles
I have stuff in two directories, vhal and milltop. I want a dependency on a .h and .c file in the vhal directory.
Subscribe to:
Post Comments (Atom)
I'm not a make expert, but shouldn't the first line be
ReplyDeleteINCL=../vhal
Take the parens off the (INCL) at line 1.
ReplyDelete