I am trying to run automake and autoconf in my project. However when I run make, I get an error "no rules to make inz.c required by inz.o". However I don't have inz.c in my project. I guess it might by an error in configuration, but it is my first time using autoconf/automake, so I'd like to kindly ask for assistance. I am running under Linux The sturcture is as following:
inz (main folder)
-configure.ac
-inz.cbp
-inz.depend
-inz.layout
-Makefile.am
--src\main.cpp
--src\main.hpp
--src\packetcapture.cpp
--src\packetcapture.hpp
--src\packetprocess.cpp
--src\packetprocess.hpp
--src\Makefile.am
configure.ac:
AC_INIT([inz], 1.0)
AC_CONFIG_AUX_DIR([build])
AM_INIT_AUTOMAKE
AC_PROG_CC
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_CONFIG_FILES([Makefile src/Makefile])
AC_OUTPUT
Makefile.am:
SUBDIRS = src
dist_doc_DATA = README.md
src\Makefile.am:
bin_PROGRAMS = inz
inz_sources = main.cpp packetcapture.cpp packetprocess.cpp
include_HEADERS = main.hpp packetcapture.hpp packetprocess.hpp
commands to compile the project itself: (it also uses -lndpi -lpthread and -lpcap)
g++ -Wall -std=c++0x -Wunused -g -Wno-deprecated-declarations -Iinclude -I./ -c /inz/src/main.cpp -o obj/Debug/src/main.o
g++ -Wall -std=c++0x -Wunused -g -Wno-deprecated-declarations -Iinclude -I./ -c /inz/src/packetcapture.cpp -o obj/Debug/src/packetcapture.o
commands I run to confiugre automake/autoconf (from the main folder):
autoreconf --install
cd build
../configure
make
bin_PROGRAMS = inz
tobin_PROGRAMS = test
, does it fail with"no rules to make test.c required by test.o"
?. It could have something to do with the fact that you have a file in your root dir starting withinz
. - zrrbite