简体   繁体   中英

mingw32-make: *** No targets. Stop

I'm trying to compile a C++ project manually ( I'm a newbie )

I have a MakeFile.am that contains:

ifneq ($(WANT_JANSSON),)
JANSSON_INCLUDES= -I$(top_srcdir)/compat/jansson
else
JANSSON_INCLUDES=
endif

EXTRA_DIST  = example-cfg.json nomacro.pl

SUBDIRS     = compat

INCLUDES    = $(PTHREAD_FLAGS) -fno-strict-aliasing $(JANSSON_INCLUDES)

bin_PROGRAMS    = minerd

dist_man_MANS   = minerd.1

minerd_SOURCES  = elist.h miner.h compat.h \
          cpu-miner.c util.c \
          sha2.c scrypt.c
ifneq ($(ARCH_x86),)
minerd_SOURCES += sha2-x86.S scrypt-x86.S
endif
ifneq ($(ARCH_x86_64),)
minerd_SOURCES += sha2-x64.S scrypt-x64.S
endif
ifneq ($(ARCH_ARM),)
minerd_SOURCES += sha2-arm.S scrypt-arm.S
endif
minerd_LDFLAGS  = $(PTHREAD_FLAGS)
minerd_LDADD    = @LIBCURL@ @JANSSON_LIBS@ @PTHREAD_LIBS@ @WS2_LIBS@
minerd_CPPFLAGS = @LIBCURL_CPPFLAGS@

I've opened the Windows' Command Prompt and type:

mingw32-make -f Makefile.am

The output:

mingw32-make: *** No targets.  Stop.

I don't know why this error shows up.

You're confused about the tools available.

A Makefile.am is not a makefile. It's an automake file. Automake is a tool that will take in a description of a makefile (the Makefile.am file) and a set of configuration options (typically, but not necessarily, generated by the auto-configuration tool autoconf ), and generate a makefile named Makefile .

Then you can run make with that Makefile in order to build your system.

These tools (autoconf and automake) are very important to portable software because so many of the UNIX-like systems have slight differences. These tools help you abstract away all those differences and even support new systems which you've never used before.

On Windows this is not so important, since most Windows systems are pretty similar and backward-compatible. So I doubt most people who are targeting Windows-only environments bother with autoconf and automake.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM