Search code examples
c++makefilehyperion

No rule to make a target (Hyperion)


So, I've been trying to compile Hyperion 1.2 program, but I always run into error: "No rule to make target "Src\Crypter\createoutput.ccp" needed for "createoutput.o" Even though it is there.

CC = g++
SRC = Src\Crypter
BIN = .
OBJ = Obj
CFLAGS = -ansi -c -Wall -pedantic -O2 -m32

.PHONY:all
all: createoutput.o fileaccess.o peanalysis.o pe.o hyperion.o ostreamlog.o
    $(CC) -o $(BIN)\hyperion.exe $(OBJ)\hyperion.o $(OBJ)\pe.o $(OBJ)\peanalysis.o $(OBJ)\fileaccess.o $(OBJ)\createoutput.o $(OBJ)\ostreamlog.o

createoutput.o: $(SRC)\createoutput.cpp
    $(CC) $(CFLAGS) -o $(OBJ)\createoutput.o $(SRC)\createoutput.cpp

fileaccess.o: $(SRC)\fileaccess.cpp
    $(CC) $(CFLAGS) -o $(OBJ)\fileaccess.o $(SRC)\fileaccess.cpp

peanalysis.o: $(SRC)\peanalysis.cpp
    $(CC) $(CFLAGS) -o $(OBJ)\peanalysis.o $(SRC)\peanalysis.cpp

pe.o: $(SRC)\pe.cpp
    $(CC) $(CFLAGS) -o $(OBJ)\pe.o $(SRC)\pe.cpp

hyperion.o: $(SRC)\hyperion.cpp
    $(CC) $(CFLAGS) -o $(OBJ)\hyperion.o $(SRC)\hyperion.cpp

ostreamlog.o: $(SRC)\ostreamlog.cpp
    $(CC) $(CFLAGS) -o $(OBJ)\ostreamlog.o $(SRC)\ostreamlog.cpp

.PHONY:clean
   clean:
   del $(BIN)\hyperion.exe && del $(OBJ)\*.o

Here is the makefile...

I realize that this question has been asked a lot of times, but I, even after about four hours of searching, can't find any answer. I tried replacing spaces with tabs and I checked the syntax. Those files are indeed in the SRC folder, so I am a little bit desperate.


Solution

  • You have to always use forward slashes in pathnames in makefiles, never backslashes.