mirror of
https://github.com/osiweb/unified_retro_keyboard.git
synced 2024-12-22 06:29:17 +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 -*-
|
# -*- makefile -*-
|
||||||
|
|
||||||
ARCH ?= atmega328p
|
ARCH ?= atmega2560
|
||||||
TARGET_KEYMAP ?= production
|
KEYMAP ?= production
|
||||||
TARGET_MAKEFILE ?= Makefile.$(ARCH)
|
TARGET_MAKEFILE ?= Makefile.app
|
||||||
|
|
||||||
BUILD_DIR = ../build
|
BUILD_DIR = ../build
|
||||||
|
|
||||||
all: app
|
all: app
|
||||||
|
|
||||||
app:
|
app:
|
||||||
make -f $(TARGET_MAKEFILE)
|
make -f $(TARGET_MAKEFILE) ARCH=$(ARCH) KEYMAP=$(KEYMAP)y
|
||||||
|
|
||||||
test:
|
test:
|
||||||
make -f Makefile.test
|
make -f Makefile.test
|
||||||
|
@ -23,8 +23,7 @@ VERSION =
|
|||||||
RELEASE=
|
RELEASE=
|
||||||
SIZE_COMMAND = avr-size
|
SIZE_COMMAND = avr-size
|
||||||
|
|
||||||
CLOCK = 16000000L
|
CLOCK = 8000000L
|
||||||
|
|
||||||
|
|
||||||
CLEAN_FILES =
|
CLEAN_FILES =
|
||||||
CLEANALL_FILES =
|
CLEANALL_FILES =
|
||||||
@ -55,6 +54,7 @@ CFLAGS += -Wundef
|
|||||||
CFLAGS += -Wold-style-definition
|
CFLAGS += -Wold-style-definition
|
||||||
CFLAGS += -mmcu=$(ARCH)
|
CFLAGS += -mmcu=$(ARCH)
|
||||||
CFLAGS += -DF_CPU=$(CLOCK)
|
CFLAGS += -DF_CPU=$(CLOCK)
|
||||||
|
|
||||||
LDFLAGS = -Wl,-Map=$(TARGET_MAP)
|
LDFLAGS = -Wl,-Map=$(TARGET_MAP)
|
||||||
LDFLAGS += -Wl,--start-group
|
LDFLAGS += -Wl,--start-group
|
||||||
LDFLAGS += -Wl,-lm
|
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 = 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_buffer.c asdf_arch.c asdf_virtual.c asdf_physical.c
|
||||||
|
SRC_FILES += asdf_hook.c
|
||||||
|
|
||||||
OBJ_FILES := $(SRC_FILES:.c=.o)
|
OBJ_FILES := $(SRC_FILES:.c=.o)
|
||||||
DEP_FILES := $(SRC_FILES:%.c=$(DEP_DIR)/%.d)
|
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_repeat.o: asdf_repeat.c asdf_repeat.h asdf_config.h
|
||||||
asdf_buffer.o: asdf_buffer.c asdf.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_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_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)
|
tags: $(SRC_FILES)
|
||||||
etags $(SRC_FILES)
|
etags $(SRC_FILES)
|
||||||
|
Loading…
Reference in New Issue
Block a user