max
max

Reputation: 1589

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.

Upvotes: 5

Views: 42185

Answers (2)

max
max

Reputation: 1589

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

make -f Makefile.mak

Upvotes: 8

steve
steve

Reputation: 6020

Type "make proj3" to run make successully.

Upvotes: 1

Related Questions