# Makefile for LPC122x micro-controller based boards
TARGET_DIR = apps/$(MODULE)/$(NAME)
+TARGET_LIB = apps/$(MODULE)/$(NAME)/lib
# If you use another of the LPC122x micro-controllers, copy the lpc_link_lpc1224.ld file
# to match you LPC micro-controller model and modify the memory sizes definitions at the
-Wl,-Map=$(TARGET_DIR)/lpc_map_$(LPC).map
-APPS = $(subst apps/,,$(wildcard apps/*/[!host]*/))
+APPS = $(subst apps/,,$(wildcard apps/*/[!host,!lib]*/))
.PHONY: all $(APPS)
all: $(APPS)
OBJS = ${C_SRC:%.c=${OBJDIR}/%.o} ${A_SRC:%.s=${OBJDIR}/%.o}
DEPS = ${OBJS:%.o=$(OBJDIR)/%.d}
-NAME_SRC = $(wildcard $(TARGET_DIR)/*.c)
-NAME_A_SRC = $(wildcard $(TARGET_DIR)/*.s)
+NAME_SRC = $(wildcard $(TARGET_DIR)/*.c) $(wildcard $(TARGET_LIB)/*.c)
+NAME_A_SRC = $(wildcard $(TARGET_DIR)/*.s) $(wildcard $(TARGET_LIB)/*.s)
NAME_OBJS = ${NAME_SRC:%.c=${OBJDIR}/%.o} ${NAME_A_SRC:%.s=${OBJDIR}/%.o}
NAME_DEPS = ${NAME_OBJS:%.o=$(OBJDIR)/%.d}