# glitch root makefile # usage: make -C -f # location of root makefile ROOTDIR := $(dir $(abspath $(lastword ${MAKEFILE_LIST}))) # include config and toolchain include $(join ${ROOTDIR},config.mk) help: @echo "info: show current configuration" @echo "all: build kernel image" @echo "run: run kernel image in qemu" @echo "test: run all tests" @echo "valgrind: run all tests in valgrind" info: @echo "- target:" @echo " ARCH: ${ARCH}" @echo " CC: ${${ARCH}_CC}" @echo " CCID: ${${ARCH}_CCID}" @echo " CFLAGS: ${${ARCH}_CFLAGS}" @echo " LD: ${${ARCH}_LD}" @echo " LDID: ${${ARCH}_LDID}" @echo " LDFLAGS: ${${ARCH}_LDFLAGS}" @echo "- host:" @echo " CC: ${HOST_CC}" @echo " CFLAGS: ${HOST_CFLAGS}" @echo " CXX: ${HOST_CXX}" @echo " CXXFLAGS: ${HOST_CXXFLAGS}" @echo " QEMU: ${QEMU}" # for auto-completion purposes list-targets: # include build from current dir include build.mk SUBDIR := $(dir $(abspath $(lastword ${MAKEFILE_LIST}))) COMPONENT := $(lastword $(subst /, ,${SUBDIR})) # generate build rules include $(join ${ROOTDIR},rules.mk)