我一直在尝试复制我在网上找到的makefile。我目前陷入以下错误:
MyComputer:folderName userName$ make
make: bin/kernel: No such file or directory
make: *** [bin/kernel] Error 1
makefile源代码如下:
### Typing 'make' will create the executable file.
CC = gcc
CFLAGS = -g -Wall
LDFLAGS =
LIBS = -lstdc++
TARGET = kernel
SRCDIR = src
OBJDIR = obj
BINDIR = bin
#TARGETDIR = $(BINDIR)/$(TARGET)
SOURCES := $(wildcard $(SRCDIR)/*.cc)
INCLUDES := $(wildcard $(SRCDIR)/*.h)
OBJECTS := $(SOURCES:$(SRCDIR)/%.cc=$(OBJDIR)/%.o)
rm = rm -f
$(BINDIR)/$(TARGET): $(OBJECTS)
@$(LINKER) $@ $(LFLAGS) $(OBJECTS) $(LIBS)
@echo "Linking complete!"
$(OBJECTS): $(OBJDIR)/%.o : $(SRCDIR)/%.cc
@$(CC) $(CFLAGS) -c $< -o $@
@echo "Compiled "$<" successfully!"
#$(CC) $(CFLAGS) $(LFLAGS) -o $(MAIN) $(OBJS) $(LIBS) $@
#make clean removed from this code, unnecessary
我尝试过的事情:
$(BINDER)/$(TARGET):
更改为$(BINDER)
(make: bin: No such file or directory
)答案 0 :(得分:2)
您的Makefile假设项目目录的结构如下:
pd.get_dummies(s).astype(np.uint8)
我修改了链接阶段,因为您没有定义a = my_list[0].strip()
b = my_list[2].strip()
:
.
├── bin
├── Makefile
├── obj
└── src
└── main.cc
运行$(LINKER)
现在将创建内核二进制文件。
CC = gcc
CFLAGS = -g -Wall
LDFLAGS =
LIBS = -lstdc++
TARGET = kernel
SRCDIR = src
OBJDIR = obj
BINDIR = bin
SOURCES := $(wildcard $(SRCDIR)/*.cc)
INCLUDES := $(wildcard $(SRCDIR)/*.h)
OBJECTS := $(SOURCES:$(SRCDIR)/%.cc=$(OBJDIR)/%.o)
rm = rm -f
$(BINDIR)/$(TARGET): $(OBJECTS)
@$(CC) -o $@ $(LFLAGS) $(OBJECTS) $(LIBS)
@echo "Linking complete!"
$(OBJECTS): $(OBJDIR)/%.o : $(SRCDIR)/%.cc
@$(CC) $(CFLAGS) -c $< -o $@
@echo "Compiled "$<" successfully!"