I have simple Makefile. When I run make
I get following error:
gcc -I -o server server.o comfunc.o
gcc: error: comfunc.o: No such file or directory
make: *** [server] Error 1
My Makefile:
CC=gcc
CFLAGS=-I
AIM = server
HEADS = ../common/common.h
OBJS = comfunc.o
MOBJ = server.o
MISCS = server.cfg
SRCS = ${OBJS:.o=.c} ${MOBJ:.o=.c}
#targets
all: $(AIM)
server:server.o
$(CC) $(LDFLAGS) $(CFLAGS) -o server server.o $(OBJS) $(LIBS)
#dependency
$(OBJS):../common/common.h
comfunc.o: ../common/common.h
#--End of Makefile--
答案 0 :(得分:1)