cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
609 Views
Registered: ‎09-27-2018

why is "INCLUDES=-I./. -I${INCLUDEDIR}", but not "INCLUDES=-I./ -I${INCLUDEDIR}"

hi all:

 

COMPILER=
ARCHIVER=
CP=cp
COMPILER_FLAGS=
EXTRA_COMPILER_FLAGS=
LIB=libxil.a

CC_FLAGS = $(COMPILER_FLAGS)
ECC_FLAGS = $(EXTRA_COMPILER_FLAGS)

RELEASEDIR=../../../lib
INCLUDEDIR=../../../include
INCLUDES=-I./. -I${INCLUDEDIR}

OUTS = *.o

LIBSOURCES:=*.c
INCLUDEFILES:=*.h

OBJECTS = $(addsuffix .o, $(basename $(wildcard *.c)))

libs: banner coresightps_dcc_comp_libs clean

%.o: %.c
${COMPILER} $(CC_FLAGS) $(ECC_FLAGS) $(INCLUDES) -o $@ $<

banner:
echo "Compiling coresightps_dcc"

coresightps_dcc_comp_libs: ${OBJECTS}
$(ARCHIVER) -r ${RELEASEDIR}/${LIB} ${OBJECTS}

.PHONY: include
include: coresightps_dcc_includes

coresightps_dcc_includes:
${CP} ${INCLUDEFILES} ${INCLUDEDIR}

clean:
rm -rf ${OBJECTS}

0 Kudos
1 Reply
Highlighted
Xilinx Employee
Xilinx Employee
563 Views
Registered: ‎10-06-2016

Hi @yulei,

Could you provide more information about this topic? I mean, use case, issue...

From Makefile point of view I think that both ways are equal:
-I./. = -I ./

Regards
Ibai

Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos