Beginner issue makefile won't work
I swear I've been looking around for 20 min trying to figure this out and I know it has to be something incredibly simple. I'm trying to create a makefile for a couple of c++ compression programs I wrote. Here is the makefile:
CC = g++ CFLAGS = -Wall LDFLAGS = ENC_SOURCES=encoderMain.cpp encoderUtils.cpp DEC_SOURCES=decoderMain.cpp decoderUtils.cpp ENC_OBJECTS=$(ENC_SOURCES:.cpp=.o) DEC_OBJECTS=$(DEC_SOURCES:.cpp=.o) ENC_EXECUTABLE=encoder all: $(ENC_SOURCES) $(ENC_EXECUTABLE) $(ENC_EXECUTABLE): $(ENC_OBJECTS) $(CC) $(LDFLAGS) $(OBJECTS) -o $@ .cpp.o: $(CC) $(CFLAGS) $< -O $@
I haven't added the decoder section yet but am just trying to get the encoder program to work. When I type in "make" into the command line, I receive this error:
make: *** No targets specified and no makefile found. Stop.
I've tried running the ./configure command and get this error:
-bash: ./configure: No such file or directory
I'm running on OS X Mavericks if that makes a difference. Thanks!
NOTE: the name of makefile is "makefile" I wrote it in a text editor so I believe it is actually makefile.txt.
Change the file name to Makefile and it should find it. (Remove the .txt)