RIOT icon indicating copy to clipboard operation
RIOT copied to clipboard

c++: Using Cpp with RIOT document is missing some parts

Open dangnhat opened this issue 12 years ago • 5 comments

I think this doc (https://github.com/RIOT-OS/RIOT/wiki/Using-CPP-on-RIOT) is missing to replace

$(BINDIR)$(PROJECT)/%.o: %.c $(PROJDEPS) $(USEPKG:%=${BINDIR}%.a)
    @mkdir -p ${BINDIR}
    @echo; echo "Compiling.... $*.c"; echo
    @test -d $(BINDIR)$(PROJECT) || mkdir -p $(BINDIR)$(PROJECT)
    $(AD)$(CC) $(CFLAGS) $(INCLUDES) -c $*.c -o $(BINDIR)$(PROJECT)/$*.o 

with

$(BINDIR)$(PROJECT)/%.o: %.cpp $(PROJDEPS) $(USEPKG:%=${BINDIR}%.a)
    @mkdir -p ${BINDIR}
    @echo; echo "Compiling.... $*.cpp"; echo
    @test -d $(BINDIR)$(PROJECT) || mkdir -p $(BINDIR)$(PROJECT)
    $(AD)$(CC) $(CFLAGS) $(INCLUDES) -c $*.cpp -o $(BINDIR)$(PROJECT)/$*.o

in RIOT/Makefile.include. :)

dangnhat avatar Mar 29 '14 15:03 dangnhat

(fixed highlighting)

Kijewski avatar Mar 29 '14 16:03 Kijewski

Feel free to edit. :)

OlegHahm avatar Apr 01 '14 13:04 OlegHahm

edited, u can review. :)

dangnhat avatar Apr 01 '14 17:04 dangnhat

@BytesGalore can you close this issue if you agree with the edit?

LudwigKnuepfer avatar Apr 02 '14 09:04 LudwigKnuepfer

yup looks good, @dangnhat thanks for the correction.

BytesGalore avatar Apr 02 '14 09:04 BytesGalore