Signed-off-by: Philipp Hachtmann <hachti@hachti.de>
#######################################
HW?=trennfix_0.4
#######################################
HW?=trennfix_0.4
+
+# Default program to build
PROG?=trennfix
BUILD_DIR=build
PROG?=trennfix
BUILD_DIR=build
+default:build
+
+all: buildall
cleanall: $(foreach prog, $(PROGRAMS), $(prog)_clean)
buildall: $(foreach prog, $(PROGRAMS), $(prog)_build)
cleanall: $(foreach prog, $(PROGRAMS), $(prog)_clean)
buildall: $(foreach prog, $(PROGRAMS), $(prog)_build)
$(Q)$(CC) -c $(ASFLAGS) $< -o $@
########################### The big template for each program ##################
$(Q)$(CC) -c $(ASFLAGS) $< -o $@
########################### The big template for each program ##################
-define PROGRAM_template=
+define PROGRAM_template=
$(1)_mupf:
@echo "$(1) Objects: " $$($(1)_OBJS)
$(1)_mupf:
@echo "$(1) Objects: " $$($(1)_OBJS)
# Determine program's object files
$(1)_OBJS=$$(foreach obj, $$($(1)_SRC:.c=.o), $(BUILD_DIR)/$$(obj))
$(1)_OBJS+=$$($(1)_ASRC:.S=.o)
# Determine program's object files
$(1)_OBJS=$$(foreach obj, $$($(1)_SRC:.c=.o), $(BUILD_DIR)/$$(obj))
$(1)_OBJS+=$$($(1)_ASRC:.S=.o)