How to add dependency in a generated Makefile - makefile

I have to modify an broken project which has errors in Makefile. However, I'm new to libtool and couldn't figure out where I should modify in the Makefile. The error is
../libpsc/.libs/libpsc.a(push_part_1vb_mix.o):(.rodata+0x38): undefined reference to `psc_push_particles_1vb_ps2_ops'
The object file which contains psc_push_particles_1vb_ps2_ops is located in ../libpsc/sse2 folder. How to modify the Makefile to let the linker find this object file? I attached portion of the Makefile. Any suggestions will be appreciated. Thanks in advance!
# Makefile.in generated by automake 1.11.6 from Makefile.am.
# src/Makefile. Generated from Makefile.in by configure.
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; #echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/psc
pkgincludedir = $(includedir)/psc
pkglibdir = $(libdir)/psc
pkglibexecdir = $(libexecdir)/psc
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = x86_64-unknown-linux-gnu
host_triplet = x86_64-unknown-linux-gnu
bin_PROGRAMS = psc_es1$(EXEEXT) psc_bohm$(EXEEXT) psc_spitzer$(EXEEXT) \
psc_kelvin_helmholtz$(EXEEXT) \
psc_kelvin_helmholtz_double$(EXEEXT) psc_mirror$(EXEEXT) \
psc_harris$(EXEEXT) psc_bubble$(EXEEXT) psc_bubble_yz$(EXEEXT) \
psc_test_emission$(EXEEXT) psc_test_singlepart$(EXEEXT) \
psc_test_microsphere$(EXEEXT) psc_photon_test$(EXEEXT) \
psc_test_twoparticles$(EXEEXT) psc_test_heating$(EXEEXT) \
psc_test_fdtd$(EXEEXT)
subdir = src
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compiler_flags.m4 \
$(top_srcdir)/m4/ax_check_hdf5.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS)
psc_bohm_SOURCES = psc_bohm.c
psc_bohm_OBJECTS = psc_bohm.$(OBJEXT)
psc_bohm_LDADD = $(LDADD)
psc_bohm_DEPENDENCIES = libpsc/libpsc.la libmrc/src/libmrc.la
AM_V_lt = $(am__v_lt_$(V))
am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
am__v_lt_0 = --silent
psc_bubble_SOURCES = psc_bubble.c
# Skip hundreds of lines...
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
include ./$(DEPDIR)/dummy.Po
include ./$(DEPDIR)/psc_bohm.Po
include ./$(DEPDIR)/psc_bubble.Po
include ./$(DEPDIR)/psc_bubble_yz.Po
include ./$(DEPDIR)/psc_es1.Po
include ./$(DEPDIR)/psc_harris.Po
include ./$(DEPDIR)/psc_kelvin_helmholtz.Po
include ./$(DEPDIR)/psc_kelvin_helmholtz_double.Po
include ./$(DEPDIR)/psc_mirror.Po
include ./$(DEPDIR)/psc_photon_test.Po
include ./$(DEPDIR)/psc_spitzer.Po
include ./$(DEPDIR)/psc_test_emission.Po
include ./$(DEPDIR)/psc_test_fdtd.Po
include ./$(DEPDIR)/psc_test_heating.Po
include ./$(DEPDIR)/psc_test_microsphere.Po
include ./$(DEPDIR)/psc_test_singlepart.Po
include ./$(DEPDIR)/psc_test_twoparticles.Po
.c.o:
$(AM_V_CC)depbase=`echo $# | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
$(COMPILE) -MT $# -MD -MP -MF $$depbase.Tpo -c -o $# $< &&\
$(am__mv) $$depbase.Tpo $$depbase.Po
# $(AM_V_CC)source='$<' object='$#' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(COMPILE) -c -o $# $<
.c.obj:
$(AM_V_CC)depbase=`echo $# | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
$(COMPILE) -MT $# -MD -MP -MF $$depbase.Tpo -c -o $# `$(CYGPATH_W) '$<'` &&\
$(am__mv) $$depbase.Tpo $$depbase.Po
# $(AM_V_CC)source='$<' object='$#' libtool=no \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(COMPILE) -c -o $# `$(CYGPATH_W) '$<'`
.c.lo:
$(AM_V_CC)depbase=`echo $# | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
$(LTCOMPILE) -MT $# -MD -MP -MF $$depbase.Tpo -c -o $# $< &&\
$(am__mv) $$depbase.Tpo $$depbase.Plo
# $(AM_V_CC)source='$<' object='$#' libtool=yes \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(LTCOMPILE) -c -o $# $<
.cxx.o:
$(AM_V_CXX)depbase=`echo $# | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
$(CXXCOMPILE) -MT $# -MD -MP -MF $$depbase.Tpo -c -o $# $< &&\
$(am__mv) $$depbase.Tpo $$depbase.Po
# $(AM_V_CXX)source='$<' object='$#' libtool=no \
# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
# $(AM_V_CXX_no)$(CXXCOMPILE) -c -o $# $<
.cxx.obj:
$(AM_V_CXX)depbase=`echo $# | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
$(CXXCOMPILE) -MT $# -MD -MP -MF $$depbase.Tpo -c -o $# `$(CYGPATH_W) '$<'` &&\
$(am__mv) $$depbase.Tpo $$depbase.Po
# $(AM_V_CXX)source='$<' object='$#' libtool=no \
# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
# $(AM_V_CXX_no)$(CXXCOMPILE) -c -o $# `$(CYGPATH_W) '$<'`
.cxx.lo:
$(AM_V_CXX)depbase=`echo $# | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
$(LTCXXCOMPILE) -MT $# -MD -MP -MF $$depbase.Tpo -c -o $# $< &&\
$(am__mv) $$depbase.Tpo $$depbase.Plo
# $(AM_V_CXX)source='$<' object='$#' libtool=yes \
# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
# $(AM_V_CXX_no)$(LTCXXCOMPILE) -c -o $# $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
# Skipped the lines left

Related

makefile missing separator showing up when using modified makefile for macOS

I am trying to use the makefile for my work related to SPheno. I am on macOS. When I try to use the command "make Model=Scotogenic". it's showing "*** missing separator". I went through lot of forums and added tabs. when I tried to do it again , now it's showing "*** commands commence before first target" . I am using the default textedit in macOS. I am attaching both the code and screenshot. The terminal screenshot
Code:
# PreDef = -DGENERATIONMIXING -DONLYDOUBLE -DSEESAWIII
PreDef = -DGENERATIONMIXING -DONLYDOUBLE
# setting various paths
InDir = ../include
Mdir = ${InDir}
name = ../lib/libSPheno.a
#
# options for various compilers
#
# Intels ifort, default in optimized mode
F90 = ifort
comp = -c -O -module ${Mdir} -I${InDir}
LFlagsB = -O
# Intels ifort, debug modus
ifeq (${F90},ifortg)
F90 = ifort
comp = -c -g -module ${Mdir} -I${InDir}
LFlagsB = -g
endif
gfortran
ifeq (${F90},gfortran)
comp = -c -O -J${Mdir} -I${InDir}
LFlagsB = -O
endif
# g95
ifeq (${F90},g95)
comp = -c -O -fmod=${Mdir} -I${InDir}
LFlagsB = -O
endif
# Lahey F95 compiler
ifeq (${F90},lf95)
comp = -c -O -M ${Mdir} -I${InDir}
LFlagsB = -O
endif
# NAG f95/2003
ifeq (${F90},nagfor)
comp = -c -O -DONLYDOUBLE -mdir ${Mdir} -I${InDir}
LFlagsB = -O
endif
.SUFFIXES : .o .ps .f90 .F90 .a
bin/SPheno: ${name} SPheno4.o
${F90} -o SPheno ${LFlagsB} SPheno4.o ../lib/${name}
mv SPheno ../bin
${name}: ${name}(Control.o) ${name}(Mathematics.o) ${name}(RGEs.o) \
${name}(MathematicsQP.o) ${name}(LoopFunctions.o) ${name}(StandardModel.o) \
${name}(Model_Data.o) ${name}(Couplings.o) ${name}(SusyMasses.o) \
${name}(LoopCouplings.o) ${name}(DecayFunctions.o) \
${name}(SusyDecays.o) ${name}(ThreeBodyPhaseSpace.o) \
${name}(ThreeBodyPhaseSpaceS.o) ${name}(Chargino3.o) \
${name}(Gluino3.o) ${name}(Neutralino3.o) \
${name}(Stop3BodyDecays.o) ${name}(Slepton3Body.o) ${name}(BranchingRatios.o) \
${name}(EplusEminusProduction.o) ${name}(TwoLoopHiggsMass.o) \
${name}(LoopMasses.o) ${name}(SugraRuns.o) ${name}(Experiment.o) \
${name}(LowEnergy.o) ${name}(NMSSM_tools.o) ${name}(RPtools.o) \
${name}(LHC_observables.o) ${name}(InputOutput.o)
clean:
rm -f *.o *~ */*.o */*~
cleanall:
rm -f bin/SPheno4 lib/*.a *~ */*.o */*~ include/*
#
# Suffix rules
#
.f90.a:
${F90} ${comp} $<
ar -ruc $# $*.o
rm -f $*.o
.F90.a:
${F90} ${comp} ${PreDef} $<
ar -ruc $# $*.o
rm -f $*.o
.f90.o:
${F90} ${comp} $<
.f90.ps:
a2ps -o $*.ps $<
.h.ps:
a2ps -o $*.ps $<

I'm trying to convert an existing makefile for macOS to one that will run under mingw-W64 on Windows10

This is the makefile for MacOS The source directory contains the source files plus the makefile and srclist.make file
# makefile for molex on macOS
OBJDIR = ../Objects
SRCDIR = ./Source
include srclist.make
FC = gfortran
FFLAGS = -x f77-cpp-input -ffixed-line-length-132 -fno-align-commons -I$(SRCDIR) -O3
OBJECTS = $(addprefix $(OBJDIR)/, $(addsuffix .o, $(basename $(SRCLIST)) ))
SOURCES = $(addprefix $(SRCDIR)/, $(SRCLIST) )
vpath %.f $(SRCDIR)
vpath %.inc $(SRCDIR)
$(OBJDIR)/%.o : %.f
$(FC) -c $(FFLAGS) $< -o $#
molex : $(OBJECTS)
$(FC) -o molex $^
.PHONY : clean
clean:
rm $(OBJDIR)/*.o
srclist.make contains a list of fortran and include files to converted to object code which are placed in a separate Objects folder
SRCLIST = \
molex.f \
background.f \
bnu.f \
charfns.f \
checkparam.f \
escape.f \
extrap.f \
fcn.f \
fdjac.f \
fmin.f \
funcv.f \
getfs.f \
idtrans.f \
initcoll.f \
initx.f \
intensity.f \
levpop.f \
lnsrch2.f \
loadmol.f \
lubksb.f \
ludcmp2.f \
newt3.f \
nextline.f \
output.f \
tau.f \
taudust.f \
Tex.f \
bug.inc \
collisions.inc \
constants.inc \
control.inc \
moldata.inc \
nlevmax.inc \
nmax.inc \
parameters.inc \
radiative.inc \
I've tried placing escape backslashes in the macOS makefile and ran in cmd prmpt with mingw32-make
the environmental Path is set as C:\msys2\mingw-w64\bin
the partly edited makefile follows
# makefile for molex on macOS
OBJDIR = ..\\Objects
SRCDIR = .\\Source
include srclist.make
FC = gfortran
FFLAGS = -x f77-cpp-input -ffixed-line-length-132 -fno-align-commons -I$(SRCDIR) -O3
#OBJECTS = $(addprefix $(OBJDIR)/, $(addsuffix .o, $(basename $(SRCLIST)) ))
OBJECTS = $(addprefix $(OBJDIR)\\, $(addsuffix .o, $(basename $(SRCLIST)) ))
SOURCES = $(addprefix $(SRCDIR)/, $(SRCLIST) )
vpath %.f $(SRCDIR)
vpath %.inc $(SRCDIR)
$(OBJDIR)\%.o : %.f
$(FC) -c $(FFLAGS) $< -o $#
molex : $(OBJECTS)
$(FC) -o molex $^
.PHONY : clean
clean:
del $(OBJDIR)/*.o
The cmd prompt output follows
D:\test_molex_ian\Source>mingw32-make -f makefile molex
mingw32-make: *** No rule to make target '..\\Objects\\molex.o', needed by 'molex'. Stop.
I would appreciate some guidance please

Issue with Makefile recipe for inputting object files

I have a makefile, that I edited so that object files should go to a separate directory.
I edited the makefile and it is now doing what I wanted to, but during linker stage it is not working as expected because I am doing something wrong.
I have a sources file and makefile as shown below:
Sources File
TARGET = demo
SRC_DIR = modbus/ascii/ \
modbus/functions/ \
modbus/port/ \
modbus/rtu/ \
modbus/ \
./
INCLUDE_DIR = modbus/include/ \
modbus/port/ \
modbus/rtu \
modbus/ascii \
./
SOURCE = modbus/ascii/mbascii.c \
modbus/functions/mbfunccoils.c \
modbus/functions/mbfuncdiag.c \
modbus/functions/mbfuncdisc.c \
modbus/functions/mbfuncholding.c \
modbus/functions/mbfuncinput.c \
modbus/functions/mbfuncother.c \
modbus/functions/mbutils.c \
modbus/port/port.c \
modbus/port/portevent.c \
modbus/port/portserial.c \
modbus/port/porttimer.c \
modbus/rtu/mbcrc.c \
modbus/rtu/mbrtu.c \
modbus/mb.c \
demo.c \
startup_LPC17xx.c \
system_LPC17xx.c
Makefile
include ./sources
ARCH = arm-none-eabi
BUILD_DIR := build/objs
# Tool definitions
CC = $(ARCH)-gcc
LD = $(ARCH)-gcc
AR = $(ARCH)-ar
AS = $(ARCH)-as
CP = $(ARCH)-objcopy
OD = $(ARCH)-objdump
SIZE = $(ARCH)-size
RM = rm
Q = # #./quiet "$#"
# Flags
CFLAGS = -W -Wall -O0 --std=gnu99 -fgnu89-inline -mcpu=cortex-m3 -mthumb
CFLAGS += -ffunction-sections -fdata-sections
ASFLAGS =
LDFLAGS = -nostartfiles -specs=nosys.specs
CPFLAGS =
ODFLAGS = -x --syms
PRFLAGS ?=
# Source files
LINKER_SCRIPT = LPC17xx.ld
OBJS = $(SOURCE:.c=.o)
BUILD_OBJS := $(patsubst %,$(BUILD_DIR)/%,$(SOURCE:.c=.o))
OBJ_DIR := $(dir $(BUILD_OBJS))
INC_PARAMS = $(foreach d, $(INCLUDE_DIR), -I$d)
print-% : ; #echo $* = $($*)
.PHONY: all size clean nuke
all: $(TARGET).bin $(TARGET).hex
isp: $(TARGET).bin
# #./quiet $< cp $^ $(MBED_VOLUME)/
size: $(TARGET).elf
#$(SIZE) $<
%.hex: %.elf
$Q $(CP) $(CPFLAGS) -O ihex $< $*.hex
%.bin: %.elf
$Q $(CP) $(CPFLAGS) -O binary $< $*.bin
$(TARGET).elf: $(OBJS)
#touch $(#:.elf=.map)
$Q $(LD) -Xlinker -Map $(#:.elf=.map) $(LDFLAGS) -T $(LINKER_SCRIPT) $(BUILD_DIR)/$^ -o $#
$Q $(OD) $(ODFLAGS) $# > $(#:.elf=.dump)
#$(SIZE) $#
$(OBJS): %.o: %.c
mkdir -p $(dir $(BUILD_OBJS))
$Q $(CC) $(CFLAGS) $(INC_PARAMS) -c $< -o $(BUILD_DIR)/$#
.PHONY: clean
clean: CRUFT=$(shell find . -name '*.o' -o -name '*.d')
clean: ; rm -f $(CRUFT); rm -f *.elf *.hex *.bin *.dump *.map; rm -rf $(BUILD_DIR)/*
nuke: clean
-rm -f *.hex *.bin *.dump *.map
The issue is in line:
$Q $(LD) -Xlinker -Map $(#:.elf=.map) $(LDFLAGS) -T $(LINKER_SCRIPT) $(BUILD_DIR)/$^ -o $#
For which the output is:
arm-none-eabi-gcc -Xlinker -Map demo.map -nostartfiles -specs=nosys.specs -T LPC17xx.ld build/objs/modbus/ascii/mbascii.o modbus/functions/mbfunccoils.o modbus/functions/mbfuncdiag.o modbus/functions/mbfuncdisc.o modbus/functions/mbfuncholding.o modbus/functions/mbfuncinput.o modbus/functions/mbfuncother.o modbus/functions/mbutils.o modbus/port/port.o modbus/port/portevent.o modbus/port/portserial.o modbus/port/porttimer.o modbus/rtu/mbcrc.o modbus/rtu/mbrtu.o modbus/mb.o demo.o startup_LPC17xx.o system_LPC17xx.o -o demo.elf
The output command picks only the first object file from correct directory under build/objs.
Rest object file path doesn't have build/objs/.
Please anyone help me resolve this issue?
You are violating Mad Scientist's second rule of makefiles, and inviting more problems than you know.
Look at these rules (simplified):
$(TARGET).elf: $(OBJS)
$(LD) $(BUILD_DIR)/$^ -o $#
$(OBJS): %.o: %.c
$(CC) -c $< -o $(BUILD_DIR)/$#
Suppose the build directory is build/ and the object file is build/foo.o. The target of the second rule is foo.o, but what it actually builds is build/foo.o. Likewise, the first rule claims foo.o as a prerequisite, but it doesn't actually use foo.o, it uses build/foo.o These two errors cancel each other out, in a sense; Make succeeds in building the main target. But as you have found, it has trouble if there is more than one object file, because if the prerequisite list is foo.o bar.o, then
`$(BUILD_DIR)/$^`
expands to
build/foo.o bar.o
Also, Make will run the second rule even if build/foo.o exists and is up to date, and will fail to run it if foo.o exists. The target of a non-PHONY rule should be the name of the file it builds, and a non-PHONY prerequisite should be the name of a file whose existence is relevant:
$(TARGET).elf: $(BUILD_OBJS)
$(LD) $^ -o $#
$(BUILD_OBJS): $(BUILD_DIR)/%.o: %.c
$(CC) -c $< -o $#

Makefile error: /bin/sh: 1: /dir Permission denied

When running make I have the following compilation error:
/bin/sh: 1: /installed/CoinAll/include/coin: Permission denied
This is the Makefile:
#
P=farmer
#
EXE=$(P)
OBJS=main-farmer.o model-farmer.o param-farmer.o pm.h
ADDLIBS=-D.
ADDINCFLAGS=-I.
SRCDIR=~/coin-projects
##########
CXX=g++
CXXFLAGS=-O3 -fomit-frame-pointer -pipe -DNDEBUG -pedantic-errors -Wimplicit -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion
CXXLINKFLAGS=-Wl,--rpath -Wl,/installed/CoinAll/lib
CC=gcc
CFLAGS=-03 -fomit-frame-pointer -pipe -DNDEBUG -pedantic-errors -Wimplicit -Wparentheses -Wsequence-point -Wreturn-type -Wcast-qual -Wall
COININCDIR=/installed/CoinAll/include/coin
# COIN-OR libs
COINLIBDIR=/installed/CoinAll/lib
# Clp
LIBS=-L$(COINLIBDIR) -lCbc -lCgl -lOsiClp -lOsi -lClp -lCoinUtils -lm \
`cat $(COINLIBDIR)/cgl_addlibs.txt` \
`cat $(COINLIBDIR)/clp_addlibs.txt` \
`cat $(COINLIBDIR)/coinutils_addlibs.txt`
INCL=-I`$(CYGPATH_W)$(COININCDIR)`$(ADDINCFLAGS)
CYGPATH_W=
CLEANFILES=\
addBits.o addBits \
addColumns.o addColumns \
addRows.o addRows \
decompose.o decompose \
defaults.o defaults \
driver2.o driver2 \
driver.o driver \
driverC.o driverC \
dualCuts.o dualCuts \
ekk.o ekk \
ekk_interface.o ekk_interface \
hello.o hello \
makeDual.o makeDual \
minimum.o minimum \
network.o network \
piece.o piece \
rowColumn.o rowColumn \
sprint2.o sprint2 \
sprint.o sprint \
testBarrier.o testBarrier \
testBasis.o testBasis \
testGub2.o testGub2 \
testGub.o testGub \
testQP.o testQP \
useVolume.o useVolume
# Part 3
#
all: $(EXE)
.SUFFIXES: .cpp .c .o .obj
$(EXE):$(OBJS)
bla=;
for file in $(OBJS); do bla="$$bla `$(CYGPATH_W) $$file`"; done; \
$(CXX) $(CXXLINKFLAGS) $(CXXFLAGS) -o $# $$bla $(ADDLIBS) $(LIBS)
####
########
############
########
####
clean:
rm -rf $(CLEANFILES)
.cpp.o:
$(CXX) $(CXXFLAGS) $(INCL) -c -o $# `test -f '$<' || echo '$(SRCDIR)/'`$<
.cpp.obj:
$(CXX) $(CXXFLAGS) $(INCL) -c -o $# `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(SRCDIR)/$<'; fi`
.c.o:
$(CC) $(CFLAGS) $(INCL) -c -o $# `test -f '$<' || echo '$(SRCDIR)/'`$<
.c.obj:
$(CC) $(CFLAGS) $(INCL) -c -o $# `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(SRCDIR)/$<'; fi`
I have set the permissions as rwx for /installed/CoinAll/include/coin and for all of its files.
Thanks.
It seems to me as if the Makefile is trying to execute the program /installed/CoinAll/include/coin which instead is a directory. It does not matter how you chmod a directory, it will still not be possible to execute as a program.
The following line:
INCL=-I$(CYGPATH_W)$(COININCDIR)$(ADDINCFLAGS)
in combination with lines like this:
$(CXX) $(CXXFLAGS) $(INCL) -c -o $# `test -f '$<' || echo '$(SRCDIR)/'`$<
... will evaluate to commands like:
g++ (a lot of c++-flags) -I`installed/CoinAll/include/coin` -c -o...
as both $(CYGPATH_W) and $(ADDINCFLAGS) are empty.
When the shell executes a command containing backticks "`"it will replace the text between the backticks with the output from the command between the backticks. Try this:
echo `ls /`
I had this error and it was my anti-virus. Turned on, I get the same error you do. Off, it works just fine. Then turning the anti-virus back on, same error as you get. It was my anti-virus so try turning all it's features off temporarily.

Autotools CFLAGS and LDFLAGS not working

I'm trying to compile a program using GNU Autotools. In my configure.ac I have the following line:
PKG_CHECK_MODULES([DEPS], [cairo], [], [AC_MSG_ERROR([Missing Cairo library])])
My src/Makefile.am looks like this:
bin_PROGRAMS = main
main_SOURCES = main.cpp window.cpp window.h button.cpp button.h
main_CFLAGS = $(DEPS_CFLAGS)
main_LDFLAGS = $(DEPS_LIBS)
In my Makefile, I've echoed $(DEPS_CFLAGS) and $(DEPS_LIBS) to confirm they have the correct values.
However, compiling fails, saying that it couldn't find a header file that should be in CFLAGS:
g++ -DPACKAGE_NAME=\"toolkit\" -DPACKAGE_TARNAME=\"toolkit\" -DPACKAGE_VERSION=\"0.0.1\" -DPACKAGE_STRING=\"toolkit\ 0.0.1\" -DPACKAGE_BUGREPORT=\"gsingh2011#gmail.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"toolkit\" -DVERSION=\"0.0.1\" -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_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE__BOOL=1 -I. -g -O2 -MT button.o -MD -MP -MF .deps/button.Tpo -c -o button.o button.cpp
button.cpp:4:23: fatal error: cairo-xcb.h: No such file or directory
#include <cairo-xcb.h>
^
compilation terminated.
make[1]: *** [button.o] Error 1
make[1]: Leaving directory `/mnt/ubuntu/home/gulshan/code/x11/toolkit/src'
make: *** [all-recursive] Error 1
This looks like the target that generated that error. You can see it doesn't mention anything about CFLAGS:
.cpp.o:
$(AM_V_CXX)$(CXXCOMPILE) -MT $# -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $# $<
$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
# $(AM_V_CXX)source='$<' object='$#' libtool=no \
# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
# $(AM_V_CXX_no)$(CXXCOMPILE) -c -o $# $<
What am I doing wrong? Here is the entire Makefile. You can see that main_CFLAGS and main_LDFLAGS are not even used.
# Makefile.in generated by automake 1.14 from Makefile.am.
# src/Makefile. Generated from Makefile.in by configure.
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/toolkit
pkgincludedir = $(includedir)/toolkit
pkglibdir = $(libdir)/toolkit
pkglibexecdir = $(libexecdir)/toolkit
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
bin_PROGRAMS = main$(EXEEXT)
subdir = src
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS)
am_main_OBJECTS = main.$(OBJEXT) window.$(OBJEXT) button.$(OBJEXT)
main_OBJECTS = $(am_main_OBJECTS)
main_LDADD = $(LDADD)
main_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(main_LDFLAGS) \
$(LDFLAGS) -o $#
AM_V_P = $(am__v_P_$(V))
am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = #echo " GEN " $#;
am__v_GEN_1 =
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = #
am__v_at_1 =
DEFAULT_INCLUDES = -I.
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
AM_V_CXX = $(am__v_CXX_$(V))
am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
am__v_CXX_0 = #echo " CXX " $#;
am__v_CXX_1 =
CXXLD = $(CXX)
CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
-o $#
AM_V_CXXLD = $(am__v_CXXLD_$(V))
am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
am__v_CXXLD_0 = #echo " CXXLD " $#;
am__v_CXXLD_1 =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_$(V))
am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
am__v_CC_0 = #echo " CC " $#;
am__v_CC_1 =
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $#
AM_V_CCLD = $(am__v_CCLD_$(V))
am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
am__v_CCLD_0 = #echo " CCLD " $#;
am__v_CCLD_1 =
SOURCES = $(main_SOURCES)
DIST_SOURCES = $(main_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = ${SHELL} /home/gulshan/code/x11/toolkit/missing aclocal-1.14
AMTAR = $${TAR-tar}
AM_DEFAULT_VERBOSITY = 1
AUTOCONF = ${SHELL} /home/gulshan/code/x11/toolkit/missing autoconf
AUTOHEADER = ${SHELL} /home/gulshan/code/x11/toolkit/missing autoheader
AUTOMAKE = ${SHELL} /home/gulshan/code/x11/toolkit/missing automake-1.14
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
CFLAGS = -g -O2
CPP = gcc -E
CPPFLAGS =
CXX = g++
CXXDEPMODE = depmode=gcc3
CXXFLAGS = -g -O2
CYGPATH_W = echo
DEFS = -DPACKAGE_NAME=\"toolkit\" -DPACKAGE_TARNAME=\"toolkit\" -DPACKAGE_VERSION=\"0.0.1\" -DPACKAGE_STRING=\"toolkit\ 0.0.1\" -DPACKAGE_BUGREPORT=\"gsingh2011#gmail.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"toolkit\" -DVERSION=\"0.0.1\" -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_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE__BOOL=1
DEPDIR = .deps
DEPS_CFLAGS = -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16
DEPS_LIBS = -lcairo
ECHO_C =
ECHO_N = -n
ECHO_T =
EGREP = /usr/bin/grep -E
EXEEXT =
GREP = /usr/bin/grep
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
LDFLAGS =
LIBOBJS =
LIBS =
LTLIBOBJS =
MAKEINFO = ${SHELL} /home/gulshan/code/x11/toolkit/missing makeinfo
MKDIR_P = /usr/bin/mkdir -p
OBJEXT = o
PACKAGE = toolkit
PACKAGE_BUGREPORT = gsingh2011#gmail.com
PACKAGE_NAME = toolkit
PACKAGE_STRING = toolkit 0.0.1
PACKAGE_TARNAME = toolkit
PACKAGE_URL =
PACKAGE_VERSION = 0.0.1
PATH_SEPARATOR = :
PKG_CONFIG = /usr/bin/pkg-config
PKG_CONFIG_LIBDIR =
PKG_CONFIG_PATH =
SET_MAKE =
SHELL = /bin/sh
STRIP =
VERSION = 0.0.1
abs_builddir = /home/gulshan/code/x11/toolkit/src
abs_srcdir = /home/gulshan/code/x11/toolkit/src
abs_top_builddir = /home/gulshan/code/x11/toolkit
abs_top_srcdir = /home/gulshan/code/x11/toolkit
ac_ct_CC = gcc
ac_ct_CXX = g++
am__include = include
am__leading_dot = .
am__quote =
am__tar = $${TAR-tar} chof - "$$tardir"
am__untar = $${TAR-tar} xf -
bindir = ${exec_prefix}/bin
build_alias =
builddir = .
datadir = ${datarootdir}
datarootdir = ${prefix}/share
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
dvidir = ${docdir}
exec_prefix = ${prefix}
host_alias =
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
install_sh = ${SHELL} /home/gulshan/code/x11/toolkit/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
localstatedir = ${prefix}/var
mandir = ${datarootdir}/man
mkdir_p = $(MKDIR_P)
oldincludedir = /usr/include
pdfdir = ${docdir}
prefix = /usr/local
program_transform_name = s,x,x,
psdir = ${docdir}
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
srcdir = .
sysconfdir = ${prefix}/etc
target_alias =
top_build_prefix = ../
top_builddir = ..
top_srcdir = ..
main_SOURCES = main.cpp window.cpp window.h button.cpp button.h
main_CFLAGS = ${DEPS_CPPFLAGS}
main_LDFLAGS = $(DEPS_LIBS)
all: all-am
.SUFFIXES:
.SUFFIXES: .cpp .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
#for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $#; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign src/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
#case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$# $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$# $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
#$(NORMAL_INSTALL)
#list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p \
; then echo "$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n;h' \
-e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) files[d] = files[d] " " $$1; \
else { print "f", $$3 "/" $$4, $$1; } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
} \
; done
uninstall-binPROGRAMS:
#$(NORMAL_UNINSTALL)
#list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' \
`; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
main$(EXEEXT): $(main_OBJECTS) $(main_DEPENDENCIES) $(EXTRA_main_DEPENDENCIES)
#rm -f main$(EXEEXT)
$(AM_V_CXXLD)$(main_LINK) $(main_OBJECTS) $(main_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
include ./$(DEPDIR)/button.Po
include ./$(DEPDIR)/main.Po
include ./$(DEPDIR)/window.Po
.cpp.o:
$(AM_V_CXX)$(CXXCOMPILE) -MT $# -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $# $<
$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
# $(AM_V_CXX)source='$<' object='$#' libtool=no \
# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
# $(AM_V_CXX_no)$(CXXCOMPILE) -c -o $# $<
.cpp.obj:
$(AM_V_CXX)$(CXXCOMPILE) -MT $# -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $# `$(CYGPATH_W) '$<'`
$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
# $(AM_V_CXX)source='$<' object='$#' libtool=no \
# DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
# $(AM_V_CXX_no)$(CXXCOMPILE) -c -o $# `$(CYGPATH_W) '$<'`
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$#" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: ctags-am
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-am
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
#srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
#$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
#echo "This command is intended for maintainers to use"
#echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-binPROGRAMS
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \
distclean distclean-compile distclean-generic distclean-tags \
distdir dvi dvi-am html html-am info info-am install \
install-am install-binPROGRAMS install-data install-data-am \
install-dvi install-dvi-am install-exec install-exec-am \
install-html install-html-am install-info install-info-am \
install-man install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
ps ps-am tags tags-am uninstall uninstall-am \
uninstall-binPROGRAMS
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
This looks like the target that generated that error. You can see it doesn't mention anything about CFLAGS:
Right. You are using the C++ compiler, not the C compiler:
main_SOURCES = main.cpp window.cpp window.h button.cpp button.h
Something like:
main_CXXFLAGS = $(DEPS_CFLAGS)
might be enough to get past your compilation error.

Resources