I'm trying to use makefile on Windows 7 x64 with Cygwin. I type "make" and the error that i get is:
make: * No targets specified and no makefile found. Stop.
Makefile:
CC = g++
CFLAGS = -g -Wall -pedantic
HDRS = node.h stack.h
SRCS = stack.cpp main.cpp
OBJS = $(patsubst %.cpp, %.o, $(SRCS))
proj3:$(OBJS)
$(CC) $(CFLAGS) -o $@ $(OBJS)
%.o: %.cpp $(HDRS)
$(CC) $(CFLAGS) -c $<
.PHONY:clean
clean:
-rm -f *.o *~ *core* proj3
None of the files are missing.
You have to install the make command. Run the Cygwin installation/configuration program, setup-x86_64.exe or setup-x86.exe (you should already have it, downloaded from here).
When you get to the screen that lets you select packages to install, find make and select it (it's probably under "Development" or something similar). Then you'll be able to run make from the Cygwin bash command line.
description: A GNU tool for controlling the generation of executables and other non-source files of a program from the program's source files. Make allows users to build and install packages without any significant knowledge about the details of the build process.
Question SOLVED: i had makefile in my directory as Makefile.mak I typed in Cygwin
make -f Makefile.mak
Type "make proj3" to run make successully.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With