VPATH를 사용하는데 VPATH가 적용이 안되네요...
제가 사용하는 makefile입니다
.SUFFIXES:
.SUFFIXES: .ec .c .o
ROOT = /home/smile/smile30
MAKEDIR = $(ROOT)/compile_area
HIST = /library_history/load
EXE_FILE=STP_MSG
VPATH = ../smiles
DATE = `date "+%y%m%d%H%M%S"`
SOURCES = cs_lib.ec msgview.ec make_mesg.ec STP_MSG.ec
OBJECTS = cs_lib.o msgview.o make_mesg.o STP_MSG.o
.ec.o:
esql -I$(ROOT)/smilei $*.ec -c 2>STPMSG_ERR
CFLAGS = -I$(ROOT)/smilei -c 2>STPMSG_ERR
EXE_PROG = /home/smile/smile30/compile_area/$(EXE_FILE)
$(EXE_PROG):$(OBJECTS)
esql -G -o $@ $(OBJECTS) $(LOADLIBES)
@rm -f $(OBJECTS) $(SOURCES:.ec=.c)
clean:
rm $(EXE_PROG) $(OBJECTS) $(SOURCES:.ec=.c)
VPATH를 ../smiles로 설정해 놓앗습니다
지금 현재 소스는 /home/smile/smile30/compile_area란 곳에 STP_MSG.ec만 있는 상태고요
나머지 소스는 /home/smile/smile30/smiles에 있습니다
make를 실행하면 아래와 같이 에러가 납니다
esql -I/home/smile/smile30/smilei cs_lib.ec -c 2>STPMSG_ERR
make: 1254-004 The error code from the last command is 1.
Stop.
esqlc: Error -33042: Cannot open input file 'cs_lib.ec'.
1 error(s) found
VPATH를 지정해 놓은 directory에 cs_lib.ec가 있고요..
man make를 해보면 아래와 같은 내용은 보이는데요...(VPATH 지정이 가능한걸로 보이는데...왜 안될까요?)
VPATH
Allows you to specify a list of directories to search for prerequisites. The list of
directories works like the PATH variable in the SHELL. The VPATH variable can specify
multiple directories separated by colons. For example:
VPATH=src:/usr/local/src
This tells the make command to search for the following directories in the order
given:
* The current directory (this happens even without VPATH)
* src (a subdirectory in the current directory )
* /usr/local/src.
이 역시 도움 좀 부탁드립니다..
댓글 달기