trennfix/sw: More versatile file structure
[eisenbahn.git] / trennfix / sw / Makefile
index 66135de0fa7880ebd03a2503c00381d819f42fc2..5f3774f61d99464686ecaf70baacefff6be1be7a 100644 (file)
 # To rebuild project do "make clean" then "make all".
 #----------------------------------------------------------------------------
 
-HW?=default
+CONFIG?=trennfix_attiny25
 
-CONFIG ?= config.make
-include ${CONFIG}
+include config/${CONFIG}.mk
 
-#test:
-#      echo ${BOOT_PAGES}
+INCLUDES+=-I mm/include -I include
+SRC+= mm/src/mm_switch.c
+CFLAGS+=-D__HW_CONF_HEADER__="<config/${CONFIG}.h>"
 
 # MCU name
 #MCU ?= atmega328
@@ -51,22 +51,14 @@ FORMAT = ihex
 
 
 # Target file name (without extension).
-TARGET = weiche1
+TARGET = trennfix
 
 # List C source files here. (C dependencies are automatically generated.)
 #SRC ?= main.c
 
 
-# List Assembler source files here.
-#     Make them always end in a capital .S.  Files ending in a lowercase .s
-#     will not be considered source files but generated files (assembler
-#     output from the compiler), and will be deleted upon "make clean"!
-#     Even though the DOS/Win* filesystem matches both .s and .S the same,
-#     it will preserve the spelling of the filenames, and gcc itself does
-#     care about how the name is spelled on its command-line.
 ASRC =
 
-
 # Optimization level, can be [0, 1, 2, 3, s].
 #     0 = turn off optimization. s = optimize for size.
 #     (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
@@ -120,6 +112,7 @@ CFLAGS += -Wall -Wstrict-prototypes
 CFLAGS += -Wa,-adhlns=$(<:.c=.lst)
 CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
 CFLAGS += $(CSTANDARD)
+CFLAGS += $(INCLUDES)
 
 
 #---------------- Assembler Options ----------------