mirror of
https://github.com/osiweb/unified_retro_keyboard.git
synced 2024-12-21 15:29:21 +00:00
Use single makefile rather than one makefile per architecture
This commit is contained in:
parent
97d38282ae
commit
1687d0ccfd
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user