NUCLEO_CPPFLAGS = $(shell nucleo-config --cppflags)
NUCLEO_CXXFLAGS = $(shell nucleo-config --cxxflags)
NUCLEO_LDFLAGS  = $(shell nucleo-config --ldflags)
NUCLEO_LIBS     = $(shell nucleo-config --libs)

CPPFLAGS = $(NUCLEO_CPPFLAGS)
CXXFLAGS = $(NUCLEO_CXXFLAGS)
LDFLAGS  = $(NUCLEO_LDFLAGS)
LIBS     = $(NUCLEO_LIBS)

hello: hello.cxx
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) $< -o $@ $(LDFLAGS) $(LIBS)

clean:
	rm -f *~ *.o

distclean: clean
	rm -f hello
