Makefile on Cygwin [英] Makefile on Cygwin

查看:392
本文介绍了Makefile on Cygwin的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用makefile在Windows 7 x64与Cygwin。
我输入make,我得到的错误是:

I'm trying to use makefile on Windows 7 x64 with Cygwin. I type "make" and the error that i get is:


make:指定的目标,没有找到makefile。停止。

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 

没有文件丢失。

推荐答案

问题解决:
i在我的目录中有makefile Makefile.mak
我在Cygwin中键入

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


make -f Makefile.mak

make -f Makefile.mak

这篇关于Makefile on Cygwin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆