Search code examples
makefilecygwin

Makefile on Cygwin


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.


Solution

  • Question SOLVED: i had makefile in my directory as Makefile.mak I typed in Cygwin

    make -f Makefile.mak