From 1687d0ccfd758c096ea18dec990c831ef80489fc Mon Sep 17 00:00:00 2001 From: Dave Date: Tue, 12 May 2020 14:52:06 -0500 Subject: [PATCH] Use single makefile rather than one makefile per architecture --- firmware/asdf/src/Makefile | 8 ++++---- firmware/asdf/src/Makefile.app | 8 +++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/firmware/asdf/src/Makefile b/firmware/asdf/src/Makefile index f53b351..fd4e999 100644 --- a/firmware/asdf/src/Makefile +++ b/firmware/asdf/src/Makefile @@ -1,15 +1,15 @@ # -*- makefile -*- -ARCH ?= atmega328p -TARGET_KEYMAP ?= production -TARGET_MAKEFILE ?= Makefile.$(ARCH) +ARCH ?= atmega2560 +KEYMAP ?= production +TARGET_MAKEFILE ?= Makefile.app BUILD_DIR = ../build all: app app: - make -f $(TARGET_MAKEFILE) + make -f $(TARGET_MAKEFILE) ARCH=$(ARCH) KEYMAP=$(KEYMAP)y test: make -f Makefile.test diff --git a/firmware/asdf/src/Makefile.app b/firmware/asdf/src/Makefile.app index bfd8562..43055fe 100644 --- a/firmware/asdf/src/Makefile.app +++ b/firmware/asdf/src/Makefile.app @@ -23,8 +23,7 @@ VERSION = RELEASE= SIZE_COMMAND = avr-size -CLOCK = 16000000L - +CLOCK = 8000000L CLEAN_FILES = CLEANALL_FILES = @@ -55,6 +54,7 @@ CFLAGS += -Wundef CFLAGS += -Wold-style-definition CFLAGS += -mmcu=$(ARCH) CFLAGS += -DF_CPU=$(CLOCK) + LDFLAGS = -Wl,-Map=$(TARGET_MAP) LDFLAGS += -Wl,--start-group LDFLAGS += -Wl,-lm @@ -69,6 +69,7 @@ MAKEDEPEND = $(CPP) $(DEPFLAGS) $(CPPFLAGS) $< \ SRC_FILES = main.c asdf.c asdf_modifiers.c asdf_repeat.c asdf_keymaps.c SRC_FILES += asdf_buffer.c asdf_arch.c asdf_virtual.c asdf_physical.c +SRC_FILES += asdf_hook.c OBJ_FILES := $(SRC_FILES:.c=.o) DEP_FILES := $(SRC_FILES:%.c=$(DEP_DIR)/%.d) @@ -141,8 +142,9 @@ asdf.o: asdf.c asdf.h asdf_arch.h asdf_keymaps.h asdf_config.h asdf_keymap_defs. asdf_repeat.o: asdf_repeat.c asdf_repeat.h asdf_config.h asdf_buffer.o: asdf_buffer.c asdf.h asdf_config.h asdf_modifiers.o: asdf_modifiers.c asdf_modifiers.h -asdf_virtual.o: asdf_virtual.c asdf_virtual.h asdf_arch.h asdf_physical.h +asdf_virtual.o: asdf_virtual.c asdf_virtual.h asdf_arch.h asdf_physical.h asdf_keymap_defs.h asdf_physical.o: asdf_physical.c asdf_virtual.h asdf_arch.h +asdf_hook.o: asdf_hook.c asdf_hook.h asdf_arch.h asdf_keymap_defs.h tags: $(SRC_FILES) etags $(SRC_FILES)