Skip to Content
Hands-On Embedded Programming with C++17
book

Hands-On Embedded Programming with C++17

by Maya Posch
January 2019
Intermediate to advanced
458 pages
10h 35m
English
Packt Publishing
Content preview from Hands-On Embedded Programming with C++17

Makefile

The Makefile for this part of the project looks as follows:

export TOP := $(CURDIR) GPP = g++ GCC = gcc MAKEDIR = mkdir -p RM = rm OUTPUT = bmac_server INCLUDE = -I . FLAGS := $(INCLUDE) -g3 -std=c++17 -U__STRICT_ANSI__ LIB := -lnymphrpc -lPocoNet -lPocoUtil -lPocoFoundation -lPocoJSON CPPFLAGS := $(FLAGS) CFLAGS := -g3  CPP_SOURCES := $(wildcard *.cpp) $(wildcard devices/*.cpp) CPP_OBJECTS := $(addprefix obj/,$(notdir) $(CPP_SOURCES:.cpp=.o)) all: makedir $(C_OBJECTS) $(CPP_OBJECTS) bin/$(OUTPUT) obj/%.o: %.cpp    $(GPP) -c -o $@ $< $(CPPFLAGS) bin/$(OUTPUT):    -rm -f $@    $(GPP) -o $@ $(C_OBJECTS) $(CPP_OBJECTS) $(LIB) makedir:    $(MAKEDIR) bin    $(MAKEDIR) obj/devices clean:    $(RM) $(CPP_OBJECTS)

This is a rather simple Makefile as we have ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On RTOS with Microcontrollers

Hands-On RTOS with Microcontrollers

Brian Amos

Publisher Resources

ISBN: 9781788629300Supplemental Content