How to include ft2build.h in SDL2 CMake project - c++

I want to compile a CMake project using SDL2 and SDL_ttf library.
I copied "SDL_ttf.c" & "SDL_ttf.h" into my src folder.
(EDIT: removed it, see comments)
I also added this to my CMakeLists.txt:
include_directories(${SDL2_TTF_INCLUDE_DIR})
freetype2 is also installed
but i get the error after calling make
src/SDL_ttf.c:28:10: fatal error: ft2build.h: No such file or directory
28 | #include <ft2build.h>
How do i properly install SDL_ttf to my system?
(https://github.com/libsdl-org/SDL_ttf/blob/main/CMakeLists.txt)
EDIT:
my CMakeLists.txt:
cmake_minimum_required(VERSION 3.7)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_definitions(-std=c++17)
set(CXX_FLAGS "-Wall")
set(CMAKE_CXX_FLAGS, "${CXX_FLAGS}")
project(SDL2Test)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
find_package(SDL2 REQUIRED)
find_package(SDL2_ttf REQUIRED)
include_directories(${SDL2_INCLUDE_DIRS} src)
include_directories(${SDL2_TTF_INCLUDE_DIR})
add_executable(Zokoban src/main.cpp src/game.cpp src/controller.cpp src/renderer.cpp src/hero.cpp src/level.cpp)
string(STRIP ${SDL2_LIBRARIES} SDL2_LIBRARIES)
target_link_libraries(Zokoban ${SDL2_LIBRARIES} ${SDL2_TTF_INCLUDE_DIR})
EDIT2:
after sudo make install (SDL_ttf source) and removing the SDL-source files from my repo:
[ 57%] Building CXX object CMakeFiles/Zokoban.dir/src/renderer.cpp.o
/07_Capstone/Zokoban/src/renderer.cpp:9:10: fatal error: SDL_ttf.h: No such file or directory
9 | #include <SDL_ttf.h>
EDIT3
On another machine (debian11) i couldn't even compile the SDL_ttf - source
19:46 $
✔ ~/ThirdParty/SDL_ttf/build [main|✚ 3…1]
19:46 $ make
/bin/bash ./libtool --tag=CC --mode=compile gcc -DPACKAGE_NAME=\"SDL2_ttf\" -DPACKAGE_TARNAME=\"SDL2_ttf\" -DPACKAGE_VERSION=\"2.21.0\" -DPACKAGE_STRING=\"SDL2_ttf\ 2.21.0\" -DPACKAGE_BUGREPORT=\"https://github.com/libsdl-org/SDL_ttf/issues\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSDL_BUILD_MAJOR_VERSION=2 -DSDL_BUILD_MINOR_VERSION=21 -DSDL_BUILD_MICRO_VERSION=0 -DPACKAGE=\"SDL2_ttf\" -DVERSION=\"2.21.0\" -DTTF_USE_HARFBUZZ=1 -DHAVE_CXX11=1 -DALIGNOF_STRUCT_CHAR__=1 -I. -I.. -I../external/freetype/include -DFT2_BUILD_LIBRARY -DFT_PUBLIC_FUNCTION_ATTRIBUTE= -I../external/harfbuzz -I../external/harfbuzz/src -DHAVE_CONFIG_H -DFT_CONFIG_OPTION_USE_HARFBUZZ -g -O2 -D_REENTRANT -I/usr/include/SDL2 -Wall -fvisibility=hidden -DHAVE_OPENGL -MT libSDL2_ttf_la-SDL_ttf.lo -MD -MP -MF .deps/libSDL2_ttf_la-SDL_ttf.Tpo -c -o libSDL2_ttf_la-SDL_ttf.lo `test -f 'SDL_ttf.c' || echo '../'`SDL_ttf.c
libtool: compile: gcc -DPACKAGE_NAME=\"SDL2_ttf\" -DPACKAGE_TARNAME=\"SDL2_ttf\" -DPACKAGE_VERSION=\"2.21.0\" "-DPACKAGE_STRING=\"SDL2_ttf 2.21.0\"" -DPACKAGE_BUGREPORT=\"https://github.com/libsdl-org/SDL_ttf/issues\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSDL_BUILD_MAJOR_VERSION=2 -DSDL_BUILD_MINOR_VERSION=21 -DSDL_BUILD_MICRO_VERSION=0 -DPACKAGE=\"SDL2_ttf\" -DVERSION=\"2.21.0\" -DTTF_USE_HARFBUZZ=1 -DHAVE_CXX11=1 -DALIGNOF_STRUCT_CHAR__=1 -I. -I.. -I../external/freetype/include -DFT2_BUILD_LIBRARY -DFT_PUBLIC_FUNCTION_ATTRIBUTE= -I../external/harfbuzz -I../external/harfbuzz/src -DHAVE_CONFIG_H -DFT_CONFIG_OPTION_USE_HARFBUZZ -g -O2 -D_REENTRANT -I/usr/include/SDL2 -Wall -fvisibility=hidden -DHAVE_OPENGL -MT libSDL2_ttf_la-SDL_ttf.lo -MD -MP -MF .deps/libSDL2_ttf_la-SDL_ttf.Tpo -c ../SDL_ttf.c -fPIC -DPIC -o .libs/libSDL2_ttf_la-SDL_ttf.o
../SDL_ttf.c:28:10: fatal error: ft2build.h: No such file or directory
28 | #include <ft2build.h>
| ^~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:1539: libSDL2_ttf_la-SDL_ttf.lo] Error 1
.. although ft2build.h is obviously installed:
ls /usr/include/freetype2/
freetype ft2build.h
EDIT4:
I downloaded from https://github.com/libsdl-org/SDL_ttf/releases "SDL2_ttf-2.20.0.tar.gz". And could configure, make and sudo make install SDL_ttf.
... but make my project is still not possible
18:03 $ make
[ 14%] Building CXX object CMakeFiles/Zokoban.dir/src/main.cpp.o
[ 28%] Building CXX object CMakeFiles/Zokoban.dir/src/game.cpp.o
[ 42%] Building CXX object CMakeFiles/Zokoban.dir/src/controller.cpp.o
[ 57%] Building CXX object CMakeFiles/Zokoban.dir/src/renderer.cpp.o
/home/Zokoban/src/renderer.cpp:9:10: fatal error: SDL_ttf.h: No such file or directory
9 | #include <SDL_ttf.h>
| ^~~~~~~~~~~
When i tried it with the released sourcecode i get still the error.
~/learning/ThirdParty/SDL_ttf-release-2.20.0/build$ make
depbase=`echo showfont.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DPACKAGE_NAME=\"SDL2_ttf\" -DPACKAGE_TARNAME=\"SDL2_ttf\" -DPACKAGE_VERSION=\"2.20.0\" -DPACKAGE_STRING=\"SDL2_ttf\ 2.20.0\" -DPACKAGE_BUGREPORT=\"https://github.com/libsdl-org/SDL_ttf/issues\" -DPACKAGE_URL=\"\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSDL_BUILD_MAJOR_VERSION=2 -DSDL_BUILD_MINOR_VERSION=20 -DSDL_BUILD_MICRO_VERSION=0 -DPACKAGE=\"SDL2_ttf\" -DVERSION=\"2.20.0\" -DTTF_USE_HARFBUZZ=1 -DHAVE_CXX11=1 -DALIGNOF_STRUCT_CHAR__=1 -I. -I.. -g -O2 -D_REENTRANT -I/usr/include/SDL2 -Wall -fvisibility=hidden -DHAVE_OPENGL -MT showfont.o -MD -MP -MF $depbase.Tpo -c -o showfont.o ../showfont.c &&\
mv -f $depbase.Tpo $depbase.Po
/bin/bash ./libtool --tag=CC --mode=compile gcc -DPACKAGE_NAME=\"SDL2_ttf\" -DPACKAGE_TARNAME=\"SDL2_ttf\" -DPACKAGE_VERSION=\"2.20.0\" -DPACKAGE_STRING=\"SDL2_ttf\ 2.20.0\" -DPACKAGE_BUGREPORT=\"https://github.com/libsdl-org/SDL_ttf/issues\" -DPACKAGE_URL=\"\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSDL_BUILD_MAJOR_VERSION=2 -DSDL_BUILD_MINOR_VERSION=20 -DSDL_BUILD_MICRO_VERSION=0 -DPACKAGE=\"SDL2_ttf\" -DVERSION=\"2.20.0\" -DTTF_USE_HARFBUZZ=1 -DHAVE_CXX11=1 -DALIGNOF_STRUCT_CHAR__=1 -I. -I.. -I../external/freetype/include -DFT2_BUILD_LIBRARY -DFT_PUBLIC_FUNCTION_ATTRIBUTE= -I../external/harfbuzz -I../external/harfbuzz/src -DHAVE_CONFIG_H -DFT_CONFIG_OPTION_USE_HARFBUZZ -g -O2 -D_REENTRANT -I/usr/include/SDL2 -Wall -fvisibility=hidden -DHAVE_OPENGL -MT libSDL2_ttf_la-SDL_ttf.lo -MD -MP -MF .deps/libSDL2_ttf_la-SDL_ttf.Tpo -c -o libSDL2_ttf_la-SDL_ttf.lo `test -f 'SDL_ttf.c' || echo '../'`SDL_ttf.c
libtool: compile: gcc -DPACKAGE_NAME=\"SDL2_ttf\" -DPACKAGE_TARNAME=\"SDL2_ttf\" -DPACKAGE_VERSION=\"2.20.0\" "-DPACKAGE_STRING=\"SDL2_ttf 2.20.0\"" -DPACKAGE_BUGREPORT=\"https://github.com/libsdl-org/SDL_ttf/issues\" -DPACKAGE_URL=\"\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSDL_BUILD_MAJOR_VERSION=2 -DSDL_BUILD_MINOR_VERSION=20 -DSDL_BUILD_MICRO_VERSION=0 -DPACKAGE=\"SDL2_ttf\" -DVERSION=\"2.20.0\" -DTTF_USE_HARFBUZZ=1 -DHAVE_CXX11=1 -DALIGNOF_STRUCT_CHAR__=1 -I. -I.. -I../external/freetype/include -DFT2_BUILD_LIBRARY -DFT_PUBLIC_FUNCTION_ATTRIBUTE= -I../external/harfbuzz -I../external/harfbuzz/src -DHAVE_CONFIG_H -DFT_CONFIG_OPTION_USE_HARFBUZZ -g -O2 -D_REENTRANT -I/usr/include/SDL2 -Wall -fvisibility=hidden -DHAVE_OPENGL -MT libSDL2_ttf_la-SDL_ttf.lo -MD -MP -MF .deps/libSDL2_ttf_la-SDL_ttf.Tpo -c ../SDL_ttf.c -fPIC -DPIC -o .libs/libSDL2_ttf_la-SDL_ttf.o
../SDL_ttf.c:28:10: fatal error: ft2build.h: No such file or directory
28 | #include <ft2build.h>
| ^~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:1536: libSDL2_ttf_la-SDL_ttf.lo] Error 1
My ideas run out :(

Related

Makefile: add flags after -o

I am trying to compile Indri 5.9 (downloaded from http://sourceforge.net/projects/lemur/) on Ubuntu 14.04 LTS using VirtualBox, but after "env CPP=/usr/bin/cpp CXX=/usr/bin/g++ ./configure" and when I "make", I got a problem: ator.cpp:216:undefined reference to 'gzopen'. I already installed zlib1g0dev by "sudo apt-get install zlib1g-dev", and according to Compilation problems with ZLIB it seems I have to add "-lz" at the end of "-o". However, this is my Makefile:
-include MakeDefns
INSTALLDIRS = $(bindir) $(includedir) $(pkgincludedir) $(includedir)/lemur $(libdir) $(pkgdatadir) $(pkgdatadir)/doc
.PHONY: all dist clean install $(INSTALLDIRS) site-search
all:
$(MAKE) -C contrib
$(MAKE) -C obj -f ../src/Makefile
ifeq ($(WITH_SWIG), 1)
$(MAKE) -C swig/src
endif
$(MAKE) -C buildindex
$(MAKE) -C runquery
$(MAKE) -C indrid
$(MAKE) -C dumpindex
$(MAKE) -C harvestlinks
$(MAKE) -C pagerank
$(MAKE) -C rmodel
$(MAKE) -C makeprior
$(MAKE) -C site-search
$(MAKE) -C modifyfields
$(MAKE) -C clarity
$(MAKE) -C reformulate
$(INSTALLDIRS):
$(INSTALL_DIR) $#
clean:
$(MAKE) clean -C contrib
$(MAKE) clean -C obj -f ../src/Makefile
ifeq ($(WITH_SWIG), 1)
$(MAKE) clean -C swig/src
endif
$(MAKE) clean -C buildindex
$(MAKE) clean -C runquery
$(MAKE) clean -C indrid
$(MAKE) clean -C dumpindex
$(MAKE) clean -C harvestlinks
$(MAKE) clean -C pagerank
$(MAKE) clean -C rmodel
$(MAKE) clean -C makeprior
$(MAKE) -C site-search clean
$(MAKE) -C modifyfields clean
$(MAKE) -C clarity clean
$(MAKE) -C reformulate clean
rm -f depend/*
distclean: clean
rm -rf autom4te.cache MakeDefns Makefile.app config.log config.status indri.ncb indri.suo
dist: distclean
$(MAKE) stamp -C obj -f ../src/Makefile
cd ..; tar zcvf indri-`date +%Y%m%d-%H%M`.tar.gz indri
install: $(INSTALLDIRS)
rm -f $(libdir)/$(INDRILIB)
$(MAKE) install -C contrib
$(MAKE) install -C obj -f ../src/Makefile
ifeq ($(WITH_SWIG), 1)
$(MAKE) install -C swig/src
endif
$(MAKE) install -C buildindex
$(MAKE) install -C runquery
$(MAKE) install -C indrid
$(MAKE) install -C dumpindex
$(MAKE) install -C harvestlinks
$(MAKE) install -C pagerank
$(MAKE) install -C rmodel
$(MAKE) install -C makeprior
$(MAKE) install -C modifyfields
$(MAKE) install -C clarity
$(MAKE) install -C reformulate
$(MAKE) install -C doc
$(MAKE) -C site-search install
$(INSTALL_DATA) Makefile.app $(pkgdatadir)
test:
And this is MakeDefns:
SHELL = /bin/bash
host_os = linux-gnu
srcdir = .
top_srcdir = .
prefix = /usr/local
exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin
sbindir = ${exec_prefix}/sbin
libexecdir = ${exec_prefix}/libexec
datadir = ${datarootdir}
sysconfdir = ${prefix}/etc
sharedstatedir = ${prefix}/com
localstatedir = ${prefix}/var
libdir = ${exec_prefix}/lib
infodir = ${datarootdir}/info
mandir = ${datarootdir}/man
includedir = ${prefix}/include
datarootdir = ${prefix}/share
oldincludedir = /usr/include
pkgdatadir = $(datadir)/indri
pkglibdir = $(libdir)/indri
pkgincludedir = $(includedir)/indri
top_builddir = .
AR = /usr/bin/ar
CC = gcc
GCC_33 = 0
CXX = /usr/bin/g++
LEX = :
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DIR = ${INSTALL} -m 755 -d
JAVAC =
JAR =
JAVAINC =
JAVADOC =
JAVAHOME =
NEED_ANTLR = 1
SWIG =
PHP_SHARED = -shared
JAVA_SHARED = -shared
CSHARP_SHARED = -shared
PHP_SO = .so
JAVA_SO = .so
CSHARP_SO = .so
PHPINCLUDE =
MCS=
DEPENDENCIES = lemur xpdf
ifeq ($(NEED_ANTLR), 1)
DEPENDENCIES += antlr
endif
PACKAGE = indri
VERSION = 5.8
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
INDRI_STANDALONE = 1
INDRILIB = lib$(PACKAGE).a
WITH_SWIG = 0
WITH_JAVA = 0
WITH_PHP = 0
WITH_CSHARP = 0
# C++ source files
CPPSRC1 = $(notdir $(wildcard ../src/*.cpp))
CPPSRC2 = $(notdir $(wildcard ../src/*.cc))
CPPSRC3 = $(notdir $(wildcard ../src/*.C))
# C source files
CSRC = $(notdir $(wildcard ../src/*.c))
# flex source files
FSRC = $(notdir $(wildcard ../src/*.l))
# Flex objects
FCPP = $(filter-out $(CPPSRC1), $(FSRC:.l=.cpp))
CPPSRC = $(CPPSRC1) $(CPPSRC3) $(CPPSRC3) $(FCPP)
.SECONDARY: $($(wildcard ../src/*.l).l=.cpp)
# All header files
ALLHEADER = $(wildcard ../include/indri/*.h*)
# Include path
INCPATH = -I../include $(patsubst %, -I../contrib/%/include, $(DEPENDENCIES))
ALLINCPATH = $(INCPATH)
# C++ objects
CPPOBJ = $(CPPSRC:.cpp=.o) $(CPPSRC2:.cc=.o) $(CPPSRC3:.C=.o)
# C objects
COBJ = $(CSRC:.c=.o)
# all objects
OBJ = $(CPPOBJ) $(COBJ)
# application makefiles should set SHARED=
# (see buildindex/Makefile
SHARED = -shared -fPIC
# C compiler and compiling options
# C++ compiler and compiling/linking options
CFLAGS = -DPACKAGE_NAME=\"Indri\" -DPACKAGE_TARNAME=\"indri\" -DPACKAGE_VERSION=\"5.8\" -DPACKAGE_STRING=\"Indri\ 5.8\" -DPACKAGE_BUGREPORT=\"project#lemurproject.org\" -DINDRI_STANDALONE=1 -DHAVE_LIBM=1 -DHAVE_LIBPTHREAD=1 -DHAVE_NAMESPACES=/\*\*/ -DISNAN_IN_NAMESPACE_STD=/\*\*/ -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FSEEKO=1 -DHAVE_EXT_ATOMICITY_H=1 -DP_NEEDS_GNU_CXX_NAMESPACE=1 -DHAVE_MKSTEMP=1 -DHAVE_MKSTEMPS=1 -DNDEBUG=1 -g -O3 $(INCPATH) $(SHARED)
CXXFLAGS = -DPACKAGE_NAME=\"Indri\" -DPACKAGE_TARNAME=\"indri\" -DPACKAGE_VERSION=\"5.8\" -DPACKAGE_STRING=\"Indri\ 5.8\" -DPACKAGE_BUGREPORT=\"project#lemurproject.org\" -DINDRI_STANDALONE=1 -DHAVE_LIBM=1 -DHAVE_LIBPTHREAD=1 -DHAVE_NAMESPACES=/\*\*/ -DISNAN_IN_NAMESPACE_STD=/\*\*/ -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FSEEKO=1 -DHAVE_EXT_ATOMICITY_H=1 -DP_NEEDS_GNU_CXX_NAMESPACE=1 -DHAVE_MKSTEMP=1 -DHAVE_MKSTEMPS=1 -DNDEBUG=1 -g -O3 $(INCPATH) $(SHARED)
CXXFLAGS_NOOPT = -DPACKAGE_NAME=\"Indri\" -DPACKAGE_TARNAME=\"indri\" -DPACKAGE_VERSION=\"5.8\" -DPACKAGE_STRING=\"Indri\ 5.8\" -DPACKAGE_BUGREPORT=\"project#lemurproject.org\" -DINDRI_STANDALONE=1 -DHAVE_LIBM=1 -DHAVE_LIBPTHREAD=1 -DHAVE_NAMESPACES=/\*\*/ -DISNAN_IN_NAMESPACE_STD=/\*\*/ -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FSEEKO=1 -DHAVE_EXT_ATOMICITY_H=1 -DP_NEEDS_GNU_CXX_NAMESPACE=1 -DHAVE_MKSTEMP=1 -DHAVE_MKSTEMPS=1 -DNDEBUG=1 -g $(INCPATH) $(SHARED)
CPPLDFLAGS = -lpthread -lm
ifeq ($(STYLE),release)
CFLAGS = -DPACKAGE_NAME=\"Indri\" -DPACKAGE_TARNAME=\"indri\" -DPACKAGE_VERSION=\"5.8\" -DPACKAGE_STRING=\"Indri\ 5.8\" -DPACKAGE_BUGREPORT=\"project#lemurproject.org\" -DINDRI_STANDALONE=1 -DHAVE_LIBM=1 -DHAVE_LIBPTHREAD=1 -DHAVE_NAMESPACES=/\*\*/ -DISNAN_IN_NAMESPACE_STD=/\*\*/ -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FSEEKO=1 -DHAVE_EXT_ATOMICITY_H=1 -DP_NEEDS_GNU_CXX_NAMESPACE=1 -DHAVE_MKSTEMP=1 -DHAVE_MKSTEMPS=1 -DNDEBUG=1 -DNDEBUG -g -O3 $(INCPATH) $(SHARED)
CXXFLAGS = -DPACKAGE_NAME=\"Indri\" -DPACKAGE_TARNAME=\"indri\" -DPACKAGE_VERSION=\"5.8\" -DPACKAGE_STRING=\"Indri\ 5.8\" -DPACKAGE_BUGREPORT=\"project#lemurproject.org\" -DINDRI_STANDALONE=1 -DHAVE_LIBM=1 -DHAVE_LIBPTHREAD=1 -DHAVE_NAMESPACES=/\*\*/ -DISNAN_IN_NAMESPACE_STD=/\*\*/ -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FSEEKO=1 -DHAVE_EXT_ATOMICITY_H=1 -DP_NEEDS_GNU_CXX_NAMESPACE=1 -DHAVE_MKSTEMP=1 -DHAVE_MKSTEMPS=1 -DNDEBUG=1 -DNDEBUG -g -O3 $(INCPATH) $(SHARED)
CPPLDFLAGS = -lpthread -lm
endif
ifeq ($(STYLE),profile)
CFLAGS=-g -pg $(INCPATH)
CXXFLAGS=-g -pg $(INCPATH)
endif
# generating C++ with flex
../src/%.cpp: ../src/%.l
$(LEX) -8 -Cf -o$# $<
I am new to Makefile, so could anyone help me on how to add "-lz" to it? Or any other suggestions for compiling Indri 5.9. Thanks a lot!

C++ Link Failure - ld: cannot find [makefile] [gcc/cygwin]

I am trying to create a system of makefiles to build my whole project. I am using cygwin and gcc compiler. I am running into a linking error on shared libraries that I cannot figure out.
I am concerned with ld: cannot find -lbase and ld: cannot find -lsimsimA429.
These files were clearly built. I even did a directory listing as part of the build command to show that they exist.
-rwxr-xr-x+ 1 user group 116832 Mar 25 10:09 /cygdrive/d/myProj/lib/libbase.so
-rwxr-xr-x+ 1 user group 75972 Mar 25 10:09 /cygdrive/d/myProj/lib/libsimsima429.so
and the link command also shows that I am including the correct link directory
g++ -shared -L/cygdrive/d/myProj/lib -lpthread -lrt -lbase -lsimsimA429 ...
What am I doing wrong to incur this error?
Also, I am relatively new to writing makefiles. If you have any comments about how I could improve them, I would kindly appreciate a few comments.
Full makefiles and output are listed below...
/cygdrive/d/myProj/src/sfi/base/makefile
#------------------------------------------------------------------------------
#-- BASE
#------------------------------------------------------------------------------
#--
# Make does not offer a recursive wildcard function, so here's one:
rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
MKDIR=mkdir
ROOTDIR=$(realpath ../../..)
PROJDIR=$(notdir $(CURDIR))
LIBDIR=$(ROOTDIR)/lib
OBJDIR=$(ROOTDIR)/obj/$(PROJDIR)
SRCDIR=$(ROOTDIR)/src
#OUTPUT FILE lib file or executable
TARGET=$(LIBDIR)/lib$(PROJDIR).so
INCLUDES=
#INCLUDES+=
LIBS=
#LIBS+=
LDFLAGS=
LDFLAGS+= -shared
LDFLAGS+= -L$(LIBDIR)
#LDFLAGS+= -Wl,-rpath
CCFLAGS=
#CCFLAGS+= -fPIC
#CCFLAGS+= -ansi
#CCFLAGS+= -pedantic
CCFLAGS+= -g
CCFLAGS+= -Wall
#CCFLAGS+= -std=c++11
CCC=g++
SRC= $(call rwildcard,./,*.cpp)
OBJECTS=$(patsubst %.cpp,$(OBJDIR)/%.o,$(SRC))
# Set our own Goal.
.DEFAULT_GOAL := all
.PHONY: all
all: $(TARGET)
$(OBJDIR)/%.o: %.cpp
#$(MKDIR) -p $(abspath $(dir $#))
$(CCC) -c $(CCFLAGS) $(INCLUDES) $< -o $#
$(TARGET): $(OBJECTS)
$(CCC) $(LDFLAGS) $(LIBS) -o $(TARGET) $(OBJECTS)
ls -l $(TARGET)
.PHONY: clean
clean:
rm -f $(OBJECTS) $(TARGET)
test:
#echo $(OBJECTS) | tr " " "\n"
/cygdrive/d/myProj/src/sfi/drivers/a429/simsimA429/makefile
#------------------------------------------------------------------------------
#-- SIMSIMA429
#------------------------------------------------------------------------------
#--
# Make does not offer a recursive wildcard function, so here's one:
rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
MKDIR=mkdir
ROOTDIR=$(realpath ../../../../..)
PROJDIR=$(notdir $(CURDIR))
LIBDIR=$(ROOTDIR)/lib
OBJDIR=$(ROOTDIR)/obj/$(PROJDIR)
SRCDIR=$(ROOTDIR)/src
#OUTPUT FILE lib file or executable
TARGET=$(LIBDIR)/lib$(PROJDIR).so
INCLUDES=
INCLUDES+= -I$(SRCDIR)/face
INCLUDES+= -I$(SRCDIR)/sfi/base
INCLUDES+= -I$(SRCDIR)/sfi/drivers/a429/include
LIBS=
LIBS+= -L$(LIBDIR)
#LIBS+= -lbase
LDFLAGS=
LDFLAGS+= -shared
#LDFLAGS+= -Wl,-rpath
CCFLAGS=
#CCFLAGS+= -fPIC
#CCFLAGS+= -ansi
#CCFLAGS+= -pedantic
CCFLAGS+= -g
CCFLAGS+= -Wall
#CCFLAGS+= -std=c++11
CCC=g++
SRC= $(call rwildcard,./,*.cpp)
OBJECTS=$(patsubst %.cpp,$(OBJDIR)/%.o,$(SRC))
# Set our own Goal.
.DEFAULT_GOAL := all
.PHONY: all
all: $(TARGET)
$(OBJDIR)/%.o: %.cpp
#$(MKDIR) -p $(abspath $(dir $#))
$(CCC) -c $(CCFLAGS) $(INCLUDES) $< -o $#
$(TARGET): $(OBJECTS)
$(CCC) $(LDFLAGS) $(LIBS) -o $(TARGET) $(OBJECTS)
ls -l $(TARGET)
.PHONY: clean
clean:
rm -f $(OBJECTS) $(TARGET)
test:
#echo $(OBJECTS) | tr " " "\n"
/cygdrive/d/myProj/src/sfi/ioss/makefile
#------------------------------------------------------------------------------
#-- IOSS
#------------------------------------------------------------------------------
#--
# Make does not offer a recursive wildcard function, so here's one:
rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
MKDIR=mkdir
ROOTDIR=$(realpath ../../..)
PROJDIR=$(notdir $(CURDIR))
LIBDIR=$(ROOTDIR)/lib
OBJDIR=$(ROOTDIR)/obj/$(PROJDIR)
SRCDIR=$(ROOTDIR)/src
#OUTPUT FILE lib file or executable
TARGET=$(LIBDIR)/lib$(PROJDIR).so
INCLUDES=
INCLUDES+= -I$(SRCDIR)/face
INCLUDES+= -I$(SRCDIR)/sfi
INCLUDES+= -I$(SRCDIR)/sfi/base
INCLUDES+= -I$(SRCDIR)/sfi/drivers/a429/include
INCLUDES+= -I$(SRCDIR)/sfi/ioss
LIBS=
LIBS+= -L$(LIBDIR)
LIBS+= -lpthread
LIBS+= -lrt
LIBS+= -lbase
LIBS+= -lsimsima429
LDFLAGS=
LDFLAGS+= -shared
#LDFLAGS+= -Wl,-rpath
CCFLAGS=
#CCFLAGS+= -fPIC
#CCFLAGS+= -ansi
#CCFLAGS+= -pedantic
CCFLAGS+= -g
CCFLAGS+= -Wall
#CCFLAGS+= -std=c++11
CCC=g++
SRC= $(call rwildcard,./,*.cpp)
OBJECTS=$(patsubst %.cpp,$(OBJDIR)/%.o,$(SRC))
# Set our own Goal.
.DEFAULT_GOAL := all
.PHONY: all
all: $(TARGET)
$(OBJDIR)/%.o: %.cpp
#$(MKDIR) -p $(abspath $(dir $#))
$(CCC) -c $(CCFLAGS) $(INCLUDES) $< -o $#
$(TARGET): $(OBJECTS)
$(CCC) $(LDFLAGS) $(LIBS) -o $(TARGET) $(OBJECTS)
ls -l $(TARGET)
.PHONY: clean
clean:
rm -f $(OBJECTS) $(TARGET)
test:
#echo $(OBJECTS) | tr " " "\n"
Full Output:
10:09:19 **** Build of configuration Default for project base ****
make -j all
g++ -c -g -Wall udpserver.cpp -o /cygdrive/d/myProj/obj/base/./udpserver.o
g++ -c -g -Wall udpclient.cpp -o /cygdrive/d/myProj/obj/base/./udpclient.o
g++ -c -g -Wall impl/clock.cpp -o /cygdrive/d/myProj/obj/base/./impl/clock.o
g++ -c -g -Wall impl/deque.cpp -o /cygdrive/d/myProj/obj/base/./impl/deque.o
g++ -c -g -Wall impl/thread.cpp -o /cygdrive/d/myProj/obj/base/./impl/thread.o
g++ -shared -L/cygdrive/d/myProj/lib -o /cygdrive/d/myProj/lib/libbase.so /cygdrive/d/myProj/obj/base/./udpserver.o /cygdrive/d/myProj/obj/base/./udpclient.o /cygdrive/d/myProj/obj/base/./impl/clock.o /cygdrive/d/myProj/obj/base/./impl/Stdafx.o /cygdrive/d/myProj/obj/base/./impl/deque.o /cygdrive/d/myProj/obj/base/./impl/thread.o
ls -l /cygdrive/d/myProj/lib/libbase.so
-rwxr-xr-x+ 1 user group 116832 Mar 25 10:09 /cygdrive/d/myProj/lib/libbase.so
10:09:25 Build Finished (took 5s.994ms)
10:09:25 **** Build of configuration Default for project simsimA429 ****
make all
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include A429HwCtrlTx.cpp -o /cygdrive/d/myProj/obj/simsima429/./A429HwCtrlTx.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include A429HwCtrlRx.cpp -o /cygdrive/d/myProj/obj/simsima429/./A429HwCtrlRx.o
g++ -shared -L/cygdrive/d/myProj/lib -o /cygdrive/d/myProj/lib/libsimsima429.so /cygdrive/d/myProj/obj/simsima429/./A429HwCtrlTx.o /cygdrive/d/myProj/obj/simsima429/./A429HwCtrlRx.o
ls -l /cygdrive/d/myProj/lib/libsimsima429.so
-rwxr-xr-x+ 1 user group 75972 Mar 25 10:09 /cygdrive/d/myProj/lib/libsimsima429.so
10:09:29 Build Finished (took 4s.339ms)
10:09:29 **** Build of configuration Default for project ioss ****
make -j all
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss IOS.cpp -o /cygdrive/d/myProj/obj/ioss/./IOS.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss message/IOSmsg.cpp -o /cygdrive/d/myProj/obj/ioss/./message/IOSmsg.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss message/MsgId.cpp -o /cygdrive/d/myProj/obj/ioss/./message/MsgId.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss message/IOSmsgA429.cpp -o /cygdrive/d/myProj/obj/ioss/./message/IOSmsgA429.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss interface/IOSInterfaceHandle.cpp -o /cygdrive/d/myProj/obj/ioss/./interface/IOSInterfaceHandle.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss interface/IOSInterface.cpp -o /cygdrive/d/myProj/obj/ioss/./interface/IOSInterface.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss interface/direct/IOSDirect_Interface.cpp -o /cygdrive/d/myProj/obj/ioss/./interface/direct/IOSDirect_Interface.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss bus/a429/A429MajorFrame.cpp -o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429MajorFrame.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss bus/a429/A429MsgRxControl.cpp -o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429MsgRxControl.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss bus/a429/A429BusTx.cpp -o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429BusTx.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss bus/a429/A429MsgRegistry.cpp -o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429MsgRegistry.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss bus/a429/A429BusRx.cpp -o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429BusRx.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss bus/a429/A429Message.cpp -o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429Message.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss bus/a429/A429MsgBuffer.cpp -o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429MsgBuffer.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss bus/m1553/M1553Connection.cpp -o /cygdrive/d/myProj/obj/ioss/./bus/m1553/M1553Connection.o
g++ -c -g -Wall -I/cygdrive/d/myProj/src/face -I/cygdrive/d/myProj/src/sfi -I/cygdrive/d/myProj/src/sfi/base -I/cygdrive/d/myProj/src/sfi/drivers/a429/include -I/cygdrive/d/myProj/src/sfi/ioss config/IOSConfig.cpp -o /cygdrive/d/myProj/obj/ioss/./config/IOSConfig.o
g++ -shared -L/cygdrive/d/myProj/lib -lpthread -lrt -lbase -lsimsima429 -o /cygdrive/d/myProj/lib/libioss.so /cygdrive/d/myProj/obj/ioss/./IOS.o /cygdrive/d/myProj/obj/ioss/./message/IOSmsg.o /cygdrive/d/myProj/obj/ioss/./message/MsgId.o /cygdrive/d/myProj/obj/ioss/./message/IOSmsgA429.o /cygdrive/d/myProj/obj/ioss/./interface/IOSInterfaceHandle.o /cygdrive/d/myProj/obj/ioss/./interface/IOSInterface.o /cygdrive/d/myProj/obj/ioss/./interface/direct/IOSDirect_Interface.o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429MajorFrame.o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429MsgRxControl.o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429BusTx.o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429MsgRegistry.o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429BusRx.o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429Message.o /cygdrive/d/myProj/obj/ioss/./bus/a429/A429MsgBuffer.o /cygdrive/d/myProj/obj/ioss/./bus/m1553/M1553Connection.o /cygdrive/d/myProj/obj/ioss/./config/IOSConfig.o
/usr/lib/gcc/x86_64-pc-cygwin/4.8.3/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lbase
/usr/lib/gcc/x86_64-pc-cygwin/4.8.3/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lsimsima429
collect2: error: ld returned 1 exit status
makefile:61: recipe for target '/cygdrive/d/myProj/lib/libioss.so' failed
make: *** [/cygdrive/d/myProj/lib/libioss.so] Error 1
10:09:42 Build Finished (took 13s.205ms)
Cygwin shared libraries are *.dll files, not lib*.so files. I suppose your linker is struggling to find base.dll and simsimA429.dll.

Makefile issue when adding option to show percentage

I tried to add to my Makefile an option to display the percentage of the compile process.
However it doesnt compile correctly now, it seems i have created in some way a loop.
My Makefile:
SHELL = /bin/sh
SYSTEM = $(shell uname)
C++ = g++
CC = gcc
DFLAGS = -DGHOST_MYSQL
OFLAGS = -O3
LFLAGS = -L. -L../bncsutil/src/bncsutil/ -L../StormLib/stormlib/ -L/usr/local/lib/Poco/ -lPocoNet -lPocoFoundation -lbncsutil -lpthread -ldl -lz -lStorm -lmysqlclient_r -lboost_date_time -lboost_thread -lboost_system -lboost_filesystem -lgmp
CFLAGS =
ifeq ($(SYSTEM),Darwin)
DFLAGS += -D__APPLE__
OFLAGS += -flat_namespace
else
LFLAGS += -lrt
endif
ifeq ($(SYSTEM),FreeBSD)
DFLAGS += -D__FREEBSD__
endif
ifeq ($(SYSTEM),SunOS)
DFLAGS += -D__SOLARIS__
LFLAGS += -lresolv -lsocket -lnsl
endif
CFLAGS += $(OFLAGS) $(DFLAGS) -I. -I../bncsutil/src/ -I../StormLib/
ifeq ($(SYSTEM),Darwin)
CFLAGS += -I../mysql/include/
endif
## PRINT_PROGRESS is initially undefined
ifndef PRINT_PROGRESS
# T estimates how many targets we are building by replacing PRINT_PROGRESS with a special string
T := $(shell $(MAKE) $(MAKECMDGOALS) --no-print-directory \
-rRf $(firstword $(MAKEFILE_LIST)) \
PRINT_PROGRESS="echo COUNTTHIS" BUILD="test x ||" | grep -c "COUNTTHIS")
N := 1
## PRINT_PROGRESS is now defined to show the progress and update N
PRINT_PROGRESS = echo "`expr " [\`expr $N '*' 100 / $T\`" : '.*\(....\)$$'`%]"$(eval N := $(shell expr $N + 1))
endif
OBJS = bncsutilinterface.o bnet.o bnetprotocol.o bnlsclient.o bnlsprotocol.o commandpacket.o config.o crc32.o csvparser.o game.o game_base.o gameplayer.o gameprotocol.o gameslot.o ghost.o ghostdb.o ghostdbmysql.o gpsprotocol.o language.o map.o packed.o replay.o savegame.o sha1.o socket.o stats.o statsdota.o util.o
COBJS =
PROGS = ./ghost++
all: $(OBJS) $(COBJS) $(PROGS)
./ghost++: $(OBJS) $(COBJS)
$(C++) -o ./ghost++ $(OBJS) $(COBJS) $(LFLAGS)
clean:
rm -f $(OBJS) $(COBJS) $(PROGS)
$(OBJS): %.o: %.cpp
#$(PRINT_PROGRESS) $(C++) -o $# $(CFLAGS) -c $<
$(COBJS): %.o: %.c
#$(PRINT_PROGRESS) $(CC) -o $# $(CFLAGS) -c $<
./ghost++: $(OBJS) $(COBJS)
all: $(PROGS)
bncsutilinterface.o: ghost.h includes.h util.h bncsutilinterface.h
bnet.o: ghost.h includes.h util.h config.h language.h socket.h commandpacket.h ghostdb.h bncsutilinterface.h bnlsclient.h bnetprotocol.h bnet.h map.h packed.h savegame.h replay.h gameprotocol.h game_base.h
bnetprotocol.o: ghost.h includes.h util.h bnetprotocol.h
bnlsclient.o: ghost.h includes.h util.h socket.h commandpacket.h bnlsprotocol.h bnlsclient.h
bnlsprotocol.o: ghost.h includes.h util.h bnlsprotocol.h
commandpacket.o: ghost.h includes.h commandpacket.h
config.o: ghost.h includes.h config.h
crc32.o: ghost.h includes.h crc32.h
csvparser.o: csvparser.h
game.o: ghost.h includes.h util.h config.h language.h socket.h ghostdb.h bnet.h map.h packed.h savegame.h gameplayer.h gameprotocol.h game_base.h game.h stats.h statsdota.h
game_base.o: ghost.h includes.h util.h config.h language.h socket.h ghostdb.h bnet.h map.h packed.h savegame.h replay.h gameplayer.h gameprotocol.h game_base.h next_combination.h
gameplayer.o: ghost.h includes.h util.h language.h socket.h commandpacket.h bnet.h map.h gameplayer.h gameprotocol.h gpsprotocol.h game_base.h
gameprotocol.o: ghost.h includes.h util.h crc32.h gameplayer.h gameprotocol.h game_base.h
gameslot.o: ghost.h includes.h gameslot.h
ghost.o: ghost.h includes.h util.h crc32.h sha1.h csvparser.h config.h language.h socket.h ghostdb.h ghostdbmysql.h bnet.h map.h packed.h savegame.h gameplayer.h gameprotocol.h gpsprotocol.h game_base.h game.h
ghostdb.o: ghost.h includes.h util.h config.h ghostdb.h
ghostdbmysql.o: ghost.h includes.h util.h config.h ghostdb.h ghostdbmysql.h
gpsprotocol.o: ghost.h util.h gpsprotocol.h
language.o: ghost.h includes.h config.h language.h
map.o: ghost.h includes.h util.h crc32.h sha1.h config.h map.h
packed.o: ghost.h includes.h util.h crc32.h packed.h
replay.o: ghost.h includes.h util.h packed.h replay.h gameprotocol.h
savegame.o: ghost.h includes.h util.h packed.h savegame.h
sha1.o: sha1.h
socket.o: ghost.h includes.h util.h socket.h
stats.o: ghost.h includes.h stats.h
statsdota.o: ghost.h includes.h util.h ghostdb.h gameplayer.h gameprotocol.h game_base.h stats.h statsdota.h
util.o: ghost.h includes.h util.h
The part I added here was:
## PRINT_PROGRESS is initially undefined
ifndef PRINT_PROGRESS
# T estimates how many targets we are building by replacing PRINT_PROGRESS with a special string
T := $(shell $(MAKE) $(MAKECMDGOALS) --no-print-directory \
-rRf $(firstword $(MAKEFILE_LIST)) \
PRINT_PROGRESS="echo COUNTTHIS" BUILD="test x ||" | grep -c "COUNTTHIS")
N := 1
## PRINT_PROGRESS is now defined to show the progress and update N
PRINT_PROGRESS = echo "`expr " [\`expr $N '*' 100 / $T\`" : '.*\(....\)$$'`%]"$(eval N := $(shell expr $N + 1))
endif
And the change of these lines:
$(OBJS): %.o: %.cpp
$(C++) -o $# $(CFLAGS) -c $<
$(COBJS): %.o: %.c
$(CC) -o $# $(CFLAGS) -c $<
to
$(OBJS): %.o: %.cpp
#$(PRINT_PROGRESS) $(C++) -o $# $(CFLAGS) -c $<
$(COBJS): %.o: %.c
#$(PRINT_PROGRESS) $(CC) -o $# $(CFLAGS) -c $<
The displayed output when compiling is now this:
$ make
g++: error: bncsutilinterface.o: No such file or directory
g++: error: bnet.o: No such file or directory
g++: error: bnetprotocol.o: No such file or directory
g++: error: bnlsclient.o: No such file or directory
g++: error: bnlsprotocol.o: No such file or directory
g++: error: commandpacket.o: No such file or directory
g++: error: config.o: No such file or directory
g++: error: crc32.o: No such file or directory
g++: error: csvparser.o: No such file or directory
g++: error: game.o: No such file or directory
g++: error: game_base.o: No such file or directory
g++: error: gameplayer.o: No such file or directory
g++: error: gameprotocol.o: No such file or directory
g++: error: gameslot.o: No such file or directory
g++: error: ghost.o: No such file or directory
g++: error: ghostdb.o: No such file or directory
g++: error: ghostdbmysql.o: No such file or directory
g++: error: gpsprotocol.o: No such file or directory
g++: error: language.o: No such file or directory
g++: error: map.o: No such file or directory
g++: error: packed.o: No such file or directory
g++: error: replay.o: No such file or directory
g++: error: savegame.o: No such file or directory
g++: error: sha1.o: No such file or directory
g++: error: socket.o: No such file or directory
g++: error: stats.o: No such file or directory
g++: error: statsdota.o: No such file or directory
g++: error: util.o: No such file or directory
make: *** [ghost++] Error 1
[3%] g++ -o bncsutilinterface.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c bncsutilinterface.cpp
[7%] g++ -o bnet.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c bnet.cpp
[10%] g++ -o bnetprotocol.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c bnetprotocol.cpp
[14%] g++ -o bnlsclient.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c bnlsclient.cpp
[17%] g++ -o bnlsprotocol.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c bnlsprotocol.cpp
[21%] g++ -o commandpacket.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c commandpacket.cpp
[25%] g++ -o config.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c config.cpp
[28%] g++ -o crc32.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c crc32.cpp
[32%] g++ -o csvparser.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c csvparser.cpp
[35%] g++ -o game.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c game.cpp
[39%] g++ -o game_base.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c game_base.cpp
[42%] g++ -o gameplayer.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c gameplayer.cpp
[46%] g++ -o gameprotocol.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c gameprotocol.cpp
[50%] g++ -o gameslot.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c gameslot.cpp
[53%] g++ -o ghost.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c ghost.cpp
[57%] g++ -o ghostdb.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c ghostdb.cpp
[60%] g++ -o ghostdbmysql.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c ghostdbmysql.cpp
[64%] g++ -o gpsprotocol.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c gpsprotocol.cpp
[67%] g++ -o language.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c language.cpp
[71%] g++ -o map.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c map.cpp
[75%] g++ -o packed.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c packed.cpp
[78%] g++ -o replay.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c replay.cpp
[82%] g++ -o savegame.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c savegame.cpp
[85%] g++ -o sha1.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c sha1.cpp
[89%] g++ -o socket.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c socket.cpp
[92%] g++ -o stats.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c stats.cpp
[96%] g++ -o statsdota.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c statsdota.cpp
[100%] g++ -o util.o -O3 -DGHOST_MYSQL -I. -I../bncsutil/src/ -I../StormLib/ -c util.cpp
g++ -o ./ghost++ bncsutilinterface.o bnet.o bnetprotocol.o bnlsclient.o bnlsprotocol.o commandpacket.o config.o crc32.o csvparser.o game.o game_base.o gameplayer.o gameprotocol.o gameslot.o ghost.o ghostdb.o ghostdbmysql.o gpsprotocol.o language.o map.o packed.o replay.o savegame.o sha1.o socket.o stats.o statsdota.o util.o -L. -L../bncsutil/src/bncsutil/ -L../StormLib/stormlib/ -L/usr/local/lib/Poco/ -lPocoNet -lPocoFoundation -lbncsutil -lpthread -ldl -lz -lStorm -lmysqlclient_r -lboost_date_time -lboost_thread -lboost_system -lboost_filesystem -lgmp -lrt
g++: error: bncsutilinterface.o: No such file or directory
g++: error: bnet.o: No such file or directory
g++: error: bnetprotocol.o: No such file or directory
g++: error: bnlsclient.o: No such file or directory
g++: error: bnlsprotocol.o: No such file or directory
g++: error: commandpacket.o: No such file or directory
g++: error: config.o: No such file or directory
g++: error: crc32.o: No such file or directory
g++: error: csvparser.o: No such file or directory
g++: error: game.o: No such file or directory
g++: error: game_base.o: No such file or directory
g++: error: gameplayer.o: No such file or directory
g++: error: gameprotocol.o: No such file or directory
g++: error: gameslot.o: No such file or directory
g++: error: ghost.o: No such file or directory
g++: error: ghostdb.o: No such file or directory
g++: error: ghostdbmysql.o: No such file or directory
g++: error: gpsprotocol.o: No such file or directory
g++: error: language.o: No such file or directory
g++: error: map.o: No such file or directory
g++: error: packed.o: No such file or directory
g++: error: replay.o: No such file or directory
g++: error: savegame.o: No such file or directory
g++: error: sha1.o: No such file or directory
g++: error: socket.o: No such file or directory
g++: error: stats.o: No such file or directory
g++: error: statsdota.o: No such file or directory
g++: error: util.o: No such file or directory
make: *** [ghost++] Error 1
The middle part is the actual wanted output.
However, the point is this is displayed in less seconds, like it just showing off but doesnt compile in any way.
What did I made wrong here?
You are passing the compilation commands as arguments to the echo in PRINT_PROGRESS.
#$(PRINT_PROGRESS) $(C++) -o $# $(CFLAGS) -c $<
You need to add a semicolon.
#$(PRINT_PROGRESS); $(C++) -o $# $(CFLAGS) -c $<
That being said I don't think this approach likely only works when each target has to print out one percentage marker (which is likely to be true much, if not all, of the time). Also this will may not play well with use of -j.

force 32 bits program in .pro file

I know I can run qmake from the command line and use:
-spec linux-g++-32
From the .pro file i've tried to add alternatively "-m32" or "-32" to "CFLAGS" or "QMAKE_CXXFLAGS" but it does not work.
CFLAGS += -m32
QMAKE_CXXFLAGS += -m32
What shall I do then ?
EDIT:
this is what is produced with the above flag...
g++ -c -pipe -m32 -g -Wall -W -D_REENTRANT -DQT_XMLPATTERNS_LIB -DQT_XML_LIB -DQT_CORE_LIB -DQT_SHARED -I/Soft/fox_dev/Qt-4.7.4/mkspecs/linux-g++ -I../fxa_march -I/Soft/fox_dev/Qt-4.7.4/include/QtCore -I/Soft/fox_dev/Qt-4.7.4/include/QtXml -I/Soft/fox_dev/Qt-4.7.4/include/QtXmlPatterns -I/Soft/fox_dev/Qt-4.7.4/include -I../../../fx/libfx -I../../../fx/MQLib -I/Soft/fox_dev/boost/boost_1_54_0 -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I. -I../fxa_march -I. -o fxa_march.o ../fxa_march/fxa_march.cpp
g++ -c -pipe -m32 -g -Wall -W -D_REENTRANT -DQT_XMLPATTERNS_LIB -DQT_XML_LIB -DQT_CORE_LIB -DQT_SHARED -I/Soft/fox_dev/Qt-4.7.4/mkspecs/linux-g++ -I../fxa_march -I/Soft/fox_dev/Qt-4.7.4/include/QtCore -I/Soft/fox_dev/Qt-4.7.4/include/QtXml -I/Soft/fox_dev/Qt-4.7.4/include/QtXmlPatterns -I/Soft/fox_dev/Qt-4.7.4/include -I../../../fx/libfx -I../../../fx/MQLib -I/Soft/fox_dev/boost/boost_1_54_0 -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I. -I../fxa_march -I. -o reports.o ../fxa_march/reports.cpp
g++ -c -pipe -m32 -g -Wall -W -D_REENTRANT -DQT_XMLPATTERNS_LIB -DQT_XML_LIB -DQT_CORE_LIB -DQT_SHARED -I/Soft/fox_dev/Qt-4.7.4/mkspecs/linux-g++ -I../fxa_march -I/Soft/fox_dev/Qt-4.7.4/include/QtCore -I/Soft/fox_dev/Qt-4.7.4/include/QtXml -I/Soft/fox_dev/Qt-4.7.4/include/QtXmlPatterns -I/Soft/fox_dev/Qt-4.7.4/include -I../../../fx/libfx -I../../../fx/MQLib -I/Soft/fox_dev/boost/boost_1_54_0 -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I. -I../fxa_march -I. -o fxa_march_params.o ../fxa_march/fxa_march_params.cpp
g++ -c -pipe -m32 -g -Wall -W -D_REENTRANT -DQT_XMLPATTERNS_LIB -DQT_XML_LIB -DQT_CORE_LIB -DQT_SHARED -I/Soft/fox_dev/Qt-4.7.4/mkspecs/linux-g++ -I../fxa_march -I/Soft/fox_dev/Qt-4.7.4/include/QtCore -I/Soft/fox_dev/Qt-4.7.4/include/QtXml -I/Soft/fox_dev/Qt-4.7.4/include/QtXmlPatterns -I/Soft/fox_dev/Qt-4.7.4/include -I../../../fx/libfx -I../../../fx/MQLib -I/Soft/fox_dev/boost/boost_1_54_0 -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I. -I../fxa_march -I. -o reportgroup.o ../fxa_march/reportgroup.cpp
g++ -c -pipe -m32 -g -Wall -W -D_REENTRANT -DQT_XMLPATTERNS_LIB -DQT_XML_LIB -DQT_CORE_LIB -DQT_SHARED -I/Soft/fox_dev/Qt-4.7.4/mkspecs/linux-g++ -I../fxa_march -I/Soft/fox_dev/Qt-4.7.4/include/QtCore -I/Soft/fox_dev/Qt-4.7.4/include/QtXml -I/Soft/fox_dev/Qt-4.7.4/include/QtXmlPatterns -I/Soft/fox_dev/Qt-4.7.4/include -I../../../fx/libfx -I../../../fx/MQLib -I/Soft/fox_dev/boost/boost_1_54_0 -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I. -I../fxa_march -I. -o db_wrapper.o ../fxa_march/db_wrapper.cpp
../fxa_march/db_wrapper.cpp: In function 'std::string as_string(FX::dbvalue, FX::dbtype)':
../fxa_march/db_wrapper.cpp:17: warning: enumeration value 'dbtype_dbvoid' not handled in switch
../fxa_march/db_wrapper.cpp:17: warning: enumeration value 'dbtype_dbdate' not handled in switch
../fxa_march/db_wrapper.cpp:17: warning: enumeration value 'dbtype_dbmoney' not handled in switch
g++ -Wl,-rpath,/Soft/fox_dev/Qt-4.7.4/lib -o fxa_march fxa_march.o reports.o fxa_march_params.o reportgroup.o db_wrapper.o -L/Soft/fox_dev/Qt-4.7.4/lib -L../../../fx/libfx -lfx -L../../../fx/MQLib -lMQ -L/Soft/fox_dev/boost/boost_bin/lib -lboost_timer -lboost_system -lboost_chrono -lboost_regex -L/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/lib -lxerces-c -lQtXmlPatterns -L/Soft/fox_dev/Qt-4.7.4/lib -lQtNetwork -lQtXml -lQtCore -lpthread
/usr/bin/ld: skipping incompatible ../../../fx/libfx/libfx.so when searching for -lfx
/usr/bin/ld: cannot find -lfx
collect2: ld returned 1 exit status
make: *** [fxa_march] Error 1
Ok, here is the point:
the diff between the generated makefile ( through QtCreator ) and the one generated by my command line is:
INCPATH = -I/Soft/fox_dev/Qt-4.7.4/mkspecs/linux-g++-32 -I. -I/Soft/fox_dev/Qt-4.7.4/include/QtCore -I/Soft/fox_dev/Qt-4.7.4/include/QtXml -I/Soft/fox_dev/Qt-4.7.4/include/QtXmlPatterns -I/Soft/fox_dev/Qt-4.7.4/include -I../../../fx/libfx -I../../../fx/MQLib -I/Soft/fox_dev/boost/boost_1_54_0 -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I.
Vs
INCPATH = -I/Soft/fox_dev/Qt-4.7.4/mkspecs/linux-g++ -I../fxa_march -I/Soft/fox_dev/Qt-4.7.4/include/QtCore -I/Soft/fox_dev/Qt-4.7.4/include/QtXml -I/Soft/fox_dev/Qt-4.7.4/include/QtXmlPatterns -I/Soft/fox_dev/Qt-4.7.4/include -I../../../fx/libfx -I../../../fx/MQLib -I/Soft/fox_dev/boost/boost_1_54_0 -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I/Soft/fox_dev/xerces-c-3.1.1-x86-linux-gcc-3.4/include -I. -I../fxa_march -I.
however one can go to "Project-> Build Settings -> [choose configuration to modify] -> And edit the "Qmake step" with additionnal argument:
-spec linux-g++-32
you will also need to add in the .pro file either of:
CFLAGS += -m32
QMAKE_CXXFLAGS += -m32
In .pro file, try writting all commands inside a scope prefixed by win32
win32 {
SOURCES += paintwidget_win.cpp
# ...
}
Commands inside the scope will be run only if the win32 variable is set.

CPP compile error: included files not found

In my app.cpp file I have the following line: #include "indri/Repository.hpp"
However when I run make (makefile below): I get the following error:
indri/Repository.hpp:22:32: error: indri/Parameters.hpp: No such file or directory
The reason is that the Repository.hpp includes other hpp in the same folder but it uses "indri/*.hpp" instead of just "*.hpp".
What am I missing ?
thanks
## your application name here
APP=myapp
SRC=$(APP).cpp
## extra object files for your app here
OBJ=
prefix = /usr/local
exec_prefix = ${prefix}
libdir = ${exec_prefix}/lib
includedir = ${prefix}/include
INCPATH=-I$(includedir)
LIBPATH=-L$(libdir)
CXXFLAGS=-DPACKAGE_NAME=\"Indri\" -DPACKAGE_TARNAME=\"indri\" -DPACKAGE_VERSION=\"5.0\" -DPACKAGE_STRING=\"Indri\ 5.0\" -DPACKAGE_BUGREPORT=\"project#lemurproject.org\" -DYYTEXT_POINTER=1 -DINDRI_STANDALONE=1 -DHAVE_LIBM=1 -DHAVE_LIBPTHREAD=1 -DHAVE_LIBZ=1 -DHAVE_NAMESPACES= -DISNAN_IN_NAMESPACE_STD= -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FSEEKO=1 -DHAVE_EXT_ATOMICITY_H=1 -DP_NEEDS_GNU_CXX_NAMESPACE=1 -DHAVE_MKSTEMP=1 -DHAVE_MKSTEMPS=1 -DNDEBUG=1 -g -O3 $(INCPATH)
CPPLDFLAGS = -lindri -lz -lpthread -lm
all:
$(CXX) $(CXXFLAGS) $(SRC) -o $(APP) $(OBJ) $(LIBPATH) $(CPPLDFLAGS)
clean:
rm -f $(APP)
Did you forget to add the current directory?
## your application name here
APP=myapp
SRC=$(APP).cpp
## extra object files for your app here
OBJ=
prefix = /usr/local
exec_prefix = ${prefix}
libdir = ${exec_prefix}/lib
includedir = ${prefix}/include
INCPATH=-I$(includedir) -I. # can you spot the difference?
LIBPATH=-L$(libdir)
CXXFLAGS=-DPACKAGE_NAME=\"Indri\" -DPACKAGE_TARNAME=\"indri\" -DPACKAGE_VERSION=\"5.0\" -DPACKAGE_STRING=\"Indri\ 5.0\" -DPACKAGE_BUGREPORT=\"project#lemurproject.org\" -DYYTEXT_POINTER=1 -DINDRI_STANDALONE=1 -DHAVE_LIBM=1 -DHAVE_LIBPTHREAD=1 -DHAVE_LIBZ=1 -DHAVE_NAMESPACES= -DISNAN_IN_NAMESPACE_STD= -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FSEEKO=1 -DHAVE_EXT_ATOMICITY_H=1 -DP_NEEDS_GNU_CXX_NAMESPACE=1 -DHAVE_MKSTEMP=1 -DHAVE_MKSTEMPS=1 -DNDEBUG=1 -g -O3 $(INCPATH)
CPPLDFLAGS = -lindri -lz -lpthread -lm
all:
$(CXX) $(CXXFLAGS) $(SRC) -o $(APP) $(OBJ) $(LIBPATH) $(CPPLDFLAGS)
clean:
rm -f $(APP)