How to open Makefile in windows?

Asked

Viewed 2,165 times

0

I would like to know how to open Makefile in windows. They sent me a file containing Makefile, but I can’t open it. I installed Cygwin to try to "run" the Makefile but it did not help (I opened the program and dragged the Makefile), it says that certain commands were not found. Thank you.

What is written in make:

#
#  Makefile
#
#############################################################
#
#
CC = gcc
CPP = g++
#
# Use only one of the next two flags
#OPTIMIZE = -O3
DEBUG = -g
#
#CFLAGS = -Wall $(OPTIMIZE)  $(DEBUG)
CFLAGS = $(OPTIMIZE)  $(DEBUG)
#
#
#
LIBS = -lm
#
ALLDEFS = 
#
OBJECTS	= lsystem.o vartree.o gstack.o psinterface.o
#
EXECUTABLE = lsystem
all: $(EXECUTABLE)
#
.c.o:	; $(CC) -c $(ALLDEFS) $(CFLAGS) $(INCPATH) -o $@ $*.c
.cpp.o:	; $(CPP) -c $(ALLDEFS) $(CFLAGS) $(INCPATH) -o $@ $*.cpp
#
$(EXECUTABLE):	$(OBJECTS)
	$(CC) -o $(EXECUTABLE) $(CFLAGS) $(OBJECTS) $(LFLAGS) $(LIBS)
#
lsystem.o:	lsystem.h psinterface.h
vartree.o:	vartree.h lsystem.h
gstack.o:	gstack.h lsystem.h
psinterface.o:	psinterface.h
#
clean :
	rm -f *.o *.ln $(EXECUTABLE) *.exe *~ *.bak
strip:
	strip $(EXECUTABLE)

  • command line entry into that folder and run: make

1 answer

1

If you have Visual Studio, run the Visual Studio command prompt from the Start menu (usually inside the Visual Studio Tools folder, go to the directory containing Makefile.win and type the following:

nmake -f Makefile.win You can also use the normal command prompt and run vsvars32.bat (C: Program Files (x86) Microsoft Visual Studio 11.0 Common7 Tools for VS2012). This will configure the environment to run nmake and find the compiler tools.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.