diff options
-rw-r--r-- | demos/ARM7-AT91SAM7X-GCC/Makefile | 12 | ||||
-rw-r--r-- | demos/ARM7-AT91SAM7X-GCC/Makefile.thumb | 12 | ||||
-rw-r--r-- | demos/ARM7-AT91SAM7X-WEB-GCC/Makefile | 18 | ||||
-rw-r--r-- | demos/ARM7-AT91SAM7X-WEB-GCC/Makefile.thumb | 18 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-G++/Makefile | 12 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-G++/Makefile.thumb | 12 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-GCC-minimal/Makefile | 9 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-GCC-minimal/Makefile.thumb | 9 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-GCC/Makefile | 12 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-GCC/Makefile.thumb | 12 | ||||
-rw-r--r-- | demos/ARMCM3-STM32F103-GCC/Makefile | 12 | ||||
-rw-r--r-- | demos/AVR-AT90CANx-GCC/Makefile | 12 | ||||
-rw-r--r-- | demos/AVR-ATmega128-GCC/Makefile | 12 | ||||
-rw-r--r-- | demos/MSP430-MSP430x1611-GCC/Makefile | 12 | ||||
-rw-r--r-- | demos/Win32-MinGW/Makefile | 13 | ||||
-rw-r--r-- | readme.txt | 2 | ||||
-rw-r--r-- | src/kernel.mk | 9 | ||||
-rw-r--r-- | test/test.mk | 3 |
18 files changed, 114 insertions, 87 deletions
diff --git a/demos/ARM7-AT91SAM7X-GCC/Makefile b/demos/ARM7-AT91SAM7X-GCC/Makefile index 0ff70ca56..7d3a7b71e 100644 --- a/demos/ARM7-AT91SAM7X-GCC/Makefile +++ b/demos/ARM7-AT91SAM7X-GCC/Makefile @@ -61,14 +61,16 @@ UDEFS = # Define ASM defines here
UADEFS =
+# Imported source files
+include ../../src/kernel.mk
+include ../../test/test.mk
+
# List ARM-mode C source files here
ASRC = ../../ports/ARM7-AT91SAM7X/chcore.c \
../../ports/ARM7-AT91SAM7X/sam7x_serial.c \
- ../../src/chinit.c ../../src/chdebug.c ../../src/chlists.c ../../src/chdelta.c \
- ../../src/chschd.c ../../src/chthreads.c ../../src/chsem.c ../../src/chmtx.c \
- ../../src/chevents.c ../../src/chmsg.c ../../src/chsleep.c ../../src/chqueues.c \
- ../../src/chserial.c \
- ../../src/lib/evtimer.c ../../test/test.c \
+ ${KERNSRC} \
+ ${TESTSRC} \
+ ../../src/lib/evtimer.c \
at91lib/aic.c \
board.c main.c
diff --git a/demos/ARM7-AT91SAM7X-GCC/Makefile.thumb b/demos/ARM7-AT91SAM7X-GCC/Makefile.thumb index 9dc1a0d7f..0b2779708 100644 --- a/demos/ARM7-AT91SAM7X-GCC/Makefile.thumb +++ b/demos/ARM7-AT91SAM7X-GCC/Makefile.thumb @@ -61,6 +61,10 @@ UDEFS = # Define ASM defines here
UADEFS =
+# Imported source files
+include ../../src/kernel.mk
+include ../../test/test.mk
+
# List ARM-mode C source files here
ASRC =
@@ -69,11 +73,9 @@ ASRC = # enabled for all modules and that lowers performance.
TSRC = ../../ports/ARM7-AT91SAM7X/chcore.c \
../../ports/ARM7-AT91SAM7X/sam7x_serial.c \
- ../../src/chinit.c ../../src/chdebug.c ../../src/chlists.c ../../src/chdelta.c \
- ../../src/chschd.c ../../src/chthreads.c ../../src/chsem.c ../../src/chmtx.c \
- ../../src/chevents.c ../../src/chmsg.c ../../src/chsleep.c ../../src/chqueues.c \
- ../../src/chserial.c \
- ../../src/lib/evtimer.c ../../test/test.c \
+ ${KERNSRC} \
+ ${TESTSRC} \
+ ../../src/lib/evtimer.c \
at91lib/aic.c \
board.c main.c
diff --git a/demos/ARM7-AT91SAM7X-WEB-GCC/Makefile b/demos/ARM7-AT91SAM7X-WEB-GCC/Makefile index a1ebaba71..77651350c 100644 --- a/demos/ARM7-AT91SAM7X-WEB-GCC/Makefile +++ b/demos/ARM7-AT91SAM7X-WEB-GCC/Makefile @@ -61,15 +61,9 @@ UDEFS = # Define ASM defines here
UADEFS =
-# List of all the ChibiOS/RT kernel files, there is no need to remove the files
-# from this list, you can disable parts of the kernel by editing chconf.h.
-KSRC = ../../src/chinit.c ../../src/chdebug.c \
- ../../src/chlists.c ../../src/chdelta.c \
- ../../src/chschd.c ../../src/chthreads.c \
- ../../src/chsem.c ../../src/chmtx.c \
- ../../src/chevents.c ../../src/chmsg.c \
- ../../src/chsleep.c ../../src/chqueues.c \
- ../../src/chserial.c
+# Imported source files
+include ../../src/kernel.mk
+include ../../test/test.mk
# List of the required uIP source files.
USRC = ../../ext/uip-1.0/uip/uip_arp.c \
@@ -84,8 +78,10 @@ USRC = ../../ext/uip-1.0/uip/uip_arp.c \ ASRC = ../../ports/ARM7-AT91SAM7X/chcore.c \
../../ports/ARM7-AT91SAM7X/sam7x_serial.c \
../../ports/ARM7-AT91SAM7X/sam7x_emac.c \
- ${KSRC} ${USRC} \
- ../../src/lib/evtimer.c ../../test/test.c \
+ ${KERNSRC} \
+ ${TESTSRC} \
+ ${USRC} \
+ ../../src/lib/evtimer.c \
at91lib/aic.c \
web/webthread.c \
board.c main.c
diff --git a/demos/ARM7-AT91SAM7X-WEB-GCC/Makefile.thumb b/demos/ARM7-AT91SAM7X-WEB-GCC/Makefile.thumb index 1ff7b8211..431111305 100644 --- a/demos/ARM7-AT91SAM7X-WEB-GCC/Makefile.thumb +++ b/demos/ARM7-AT91SAM7X-WEB-GCC/Makefile.thumb @@ -61,15 +61,9 @@ UDEFS = # Define ASM defines here
UADEFS =
-# List of all the ChibiOS/RT kernel files, there is no need to remove the files
-# from this list, you can disable parts of the kernel by editing chconf.h.
-KSRC = ../../src/chinit.c ../../src/chdebug.c \
- ../../src/chlists.c ../../src/chdelta.c \
- ../../src/chschd.c ../../src/chthreads.c \
- ../../src/chsem.c ../../src/chmtx.c \
- ../../src/chevents.c ../../src/chmsg.c \
- ../../src/chsleep.c ../../src/chqueues.c \
- ../../src/chserial.c
+# Imported source files
+include ../../src/kernel.mk
+include ../../test/test.mk
# List of the required uIP source files.
USRC = ../../ext/uip-1.0/uip/uip_arp.c \
@@ -90,8 +84,10 @@ ASRC = TSRC = ../../ports/ARM7-AT91SAM7X/chcore.c \
../../ports/ARM7-AT91SAM7X/sam7x_serial.c \
../../ports/ARM7-AT91SAM7X/sam7x_emac.c \
- ${KSRC} ${USRC} \
- ../../src/lib/evtimer.c ../../test/test.c \
+ ${KERNSRC} \
+ ${TESTSRC} \
+ ${USRC} \
+ ../../src/lib/evtimer.c \
at91lib/aic.c \
web/webthread.c \
board.c main.c
diff --git a/demos/ARM7-LPC214x-G++/Makefile b/demos/ARM7-LPC214x-G++/Makefile index 6c04023a8..f54c1ba2d 100644 --- a/demos/ARM7-LPC214x-G++/Makefile +++ b/demos/ARM7-LPC214x-G++/Makefile @@ -67,15 +67,17 @@ UDEFS = # Define ASM defines here
UADEFS =
+# Imported source files
+include ../../src/kernel.mk
+include ../../test/test.mk
+
# List ARM-mode C source files here
ACSRC = ../../ports/ARM7-LPC214x/chcore.c \
../../ports/ARM7-LPC214x/vic.c \
../../ports/ARM7-LPC214x/lpc214x_serial.c \
- ../../src/chinit.c ../../src/chdebug.c ../../src/chlists.c ../../src/chdelta.c \
- ../../src/chschd.c ../../src/chthreads.c ../../src/chsem.c ../../src/chmtx.c \
- ../../src/chevents.c ../../src/chmsg.c ../../src/chsleep.c ../../src/chqueues.c \
- ../../src/chserial.c \
- ../../src/lib/evtimer.c ../../test/test.c \
+ ${KERNSRC} \
+ ${TESTSRC} \
+ ../../src/lib/evtimer.c \
board.c
# List ARM-mode C++ source files here
diff --git a/demos/ARM7-LPC214x-G++/Makefile.thumb b/demos/ARM7-LPC214x-G++/Makefile.thumb index 9171d2b72..4e2fd2f7c 100644 --- a/demos/ARM7-LPC214x-G++/Makefile.thumb +++ b/demos/ARM7-LPC214x-G++/Makefile.thumb @@ -67,6 +67,10 @@ UDEFS = # Define ASM defines here
UADEFS =
+# Imported source files
+include ../../src/kernel.mk
+include ../../test/test.mk
+
# List ARM-mode C source files here
ACSRC =
@@ -77,11 +81,9 @@ ACPPSRC = TCSRC = ../../ports/ARM7-LPC214x/chcore.c \
../../ports/ARM7-LPC214x/vic.c \
../../ports/ARM7-LPC214x/lpc214x_serial.c \
- ../../src/chinit.c ../../src/chdebug.c ../../src/chlists.c ../../src/chdelta.c \
- ../../src/chschd.c ../../src/chthreads.c ../../src/chsem.c ../../src/chmtx.c \
- ../../src/chevents.c ../../src/chmsg.c ../../src/chsleep.c ../../src/chqueues.c \
- ../../src/chserial.c \
- ../../src/lib/evtimer.c ../../test/test.c \
+ ${KERNSRC} \
+ ${TESTSRC} \
+ ../../src/lib/evtimer.c \
board.c
# List THUMB-mode C++ source files here
diff --git a/demos/ARM7-LPC214x-GCC-minimal/Makefile b/demos/ARM7-LPC214x-GCC-minimal/Makefile index fc941b4ce..93e7df446 100644 --- a/demos/ARM7-LPC214x-GCC-minimal/Makefile +++ b/demos/ARM7-LPC214x-GCC-minimal/Makefile @@ -61,13 +61,14 @@ UDEFS = # Define ASM defines here
UADEFS =
+# Imported source files
+include ../../src/kernel.mk
+include ../../test/test.mk
+
# List ARM-mode C source files here
ASRC = ../../ports/ARM7-LPC214x/chcore.c \
../../ports/ARM7-LPC214x/vic.c \
- ../../src/chinit.c ../../src/chdebug.c ../../src/chlists.c ../../src/chdelta.c \
- ../../src/chschd.c ../../src/chthreads.c ../../src/chsem.c ../../src/chmtx.c \
- ../../src/chevents.c ../../src/chmsg.c ../../src/chsleep.c ../../src/chqueues.c \
- ../../src/chserial.c \
+ ${KERNSRC} \
board.c main.c
# List THUMB-mode C sources here
diff --git a/demos/ARM7-LPC214x-GCC-minimal/Makefile.thumb b/demos/ARM7-LPC214x-GCC-minimal/Makefile.thumb index 95cb19000..11b393c47 100644 --- a/demos/ARM7-LPC214x-GCC-minimal/Makefile.thumb +++ b/demos/ARM7-LPC214x-GCC-minimal/Makefile.thumb @@ -61,6 +61,10 @@ UDEFS = # Define ASM defines here
UADEFS =
+# Imported source files
+include ../../src/kernel.mk
+include ../../test/test.mk
+
# List ARM-mode C source files here
ASRC =
@@ -69,10 +73,7 @@ ASRC = # enabled for all modules and that lowers performance.
TSRC = ../../ports/ARM7-LPC214x/chcore.c \
../../ports/ARM7-LPC214x/vic.c \
- ../../src/chinit.c ../../src/chdebug.c ../../src/chlists.c ../../src/chdelta.c \
- ../../src/chschd.c ../../src/chthreads.c ../../src/chsem.c ../../src/chmtx.c \
- ../../src/chevents.c ../../src/chmsg.c ../../src/chsleep.c ../../src/chqueues.c \
- ../../src/chserial.c \
+ ${KERNSRC} \
board.c main.c
# List ASM source files here
diff --git a/demos/ARM7-LPC214x-GCC/Makefile b/demos/ARM7-LPC214x-GCC/Makefile index 5ee1985a6..a2dd69afe 100644 --- a/demos/ARM7-LPC214x-GCC/Makefile +++ b/demos/ARM7-LPC214x-GCC/Makefile @@ -61,18 +61,18 @@ UDEFS = # Define ASM defines here
UADEFS =
+# Imported source files
+include ../../src/kernel.mk
+include ../../test/test.mk
+
# List ARM-mode C source files here
ASRC = ../../ports/ARM7-LPC214x/chcore.c \
../../ports/ARM7-LPC214x/vic.c \
../../ports/ARM7-LPC214x/lpc214x_serial.c \
../../ports/ARM7-LPC214x/lpc214x_ssp.c \
- ../../src/chinit.c ../../src/chdebug.c ../../src/chlists.c ../../src/chdelta.c \
- ../../src/chschd.c ../../src/chthreads.c ../../src/chsem.c ../../src/chmtx.c \
- ../../src/chevents.c ../../src/chmsg.c ../../src/chsleep.c ../../src/chqueues.c \
- ../../src/chserial.c \
+ ${KERNSRC} \
+ ${TESTSRC} \
../../src/lib/evtimer.c \
- ../../test/test.c ../../test/testrdy.c ../../test/testsem.c \
- ../../test/testmtx.c ../../test/testmsg.c ../../test/testbmk.c \
board.c buzzer.c mmcsd.c main.c
# List THUMB-mode C sources here
diff --git a/demos/ARM7-LPC214x-GCC/Makefile.thumb b/demos/ARM7-LPC214x-GCC/Makefile.thumb index 83e19ebff..0e426e5b7 100644 --- a/demos/ARM7-LPC214x-GCC/Makefile.thumb +++ b/demos/ARM7-LPC214x-GCC/Makefile.thumb @@ -61,6 +61,10 @@ UDEFS = # Define ASM defines here
UADEFS =
+# Imported source files
+include ../../src/kernel.mk
+include ../../test/test.mk
+
# List ARM-mode C source files here
ASRC =
@@ -71,11 +75,9 @@ TSRC = ../../ports/ARM7-LPC214x/chcore.c \ ../../ports/ARM7-LPC214x/vic.c \
../../ports/ARM7-LPC214x/lpc214x_serial.c \
../../ports/ARM7-LPC214x/lpc214x_ssp.c \
- ../../src/chinit.c ../../src/chdebug.c ../../src/chlists.c ../../src/chdelta.c \
- ../../src/chschd.c ../../src/chthreads.c ../../src/chsem.c ../../src/chmtx.c \
- ../../src/chevents.c ../../src/chmsg.c ../../src/chsleep.c ../../src/chqueues.c \
- ../../src/chserial.c \
- ../../src/lib/evtimer.c ../../test/test.c \
+ ${KERNSRC} \
+ ${TESTSRC} \
+ ../../src/lib/evtimer.c \
board.c buzzer.c mmcsd.c main.c
# List ASM source files here
diff --git a/demos/ARMCM3-STM32F103-GCC/Makefile b/demos/ARMCM3-STM32F103-GCC/Makefile index d51c8113d..dbf9fd9eb 100644 --- a/demos/ARMCM3-STM32F103-GCC/Makefile +++ b/demos/ARMCM3-STM32F103-GCC/Makefile @@ -62,14 +62,16 @@ UDEFS = # Define ASM defines here
UADEFS =
+# Imported source files
+include ../../src/kernel.mk
+include ../../test/test.mk
+
# List ARM-mode C source files here
SRC = ../../ports/ARMCM3/chcore.c ../../ports/ARMCM3/nvic.c \
../../ports/ARMCM3-STM32F103/stm32_serial.c \
- ../../src/chinit.c ../../src/chdebug.c ../../src/chlists.c ../../src/chdelta.c \
- ../../src/chschd.c ../../src/chthreads.c ../../src/chsem.c ../../src/chmtx.c \
- ../../src/chevents.c ../../src/chmsg.c ../../src/chsleep.c ../../src/chqueues.c \
- ../../src/chserial.c \
- ../../src/lib/evtimer.c ../../test/test.c \
+ ${KERNSRC} \
+ ${TESTSRC} \
+ ../../src/lib/evtimer.c \
board.c main.c
# List ASM source files here
diff --git a/demos/AVR-AT90CANx-GCC/Makefile b/demos/AVR-AT90CANx-GCC/Makefile index 37c56acf9..a72f1f913 100644 --- a/demos/AVR-AT90CANx-GCC/Makefile +++ b/demos/AVR-AT90CANx-GCC/Makefile @@ -79,14 +79,16 @@ TARGET = ch OBJDIR = .
+# Imported source files
+include ../../src/kernel.mk
+include ../../test/test.mk
+
+
# List C source files here. (C dependencies are automatically generated.)
SRC = ../../ports/AVR/chcore.c ../../ports/AVR/avr_serial.c \
- ../../src/chinit.c ../../src/chdebug.c ../../src/chlists.c ../../src/chdelta.c \
- ../../src/chschd.c ../../src/chthreads.c ../../src/chsem.c ../../src/chmtx.c \
- ../../src/chevents.c ../../src/chmsg.c ../../src/chsleep.c ../../src/chqueues.c \
- ../../src/chserial.c \
+ ${KERNSRC} \
+ ${TESTSRC} \
../../src/lib/evtimer.c \
- ../../test/test.c \
board.c main.c
diff --git a/demos/AVR-ATmega128-GCC/Makefile b/demos/AVR-ATmega128-GCC/Makefile index 3be566c19..89b5118ff 100644 --- a/demos/AVR-ATmega128-GCC/Makefile +++ b/demos/AVR-ATmega128-GCC/Makefile @@ -79,14 +79,16 @@ TARGET = ch OBJDIR = .
+# Imported source files
+include ../../src/kernel.mk
+include ../../test/test.mk
+
+
# List C source files here. (C dependencies are automatically generated.)
SRC = ../../ports/AVR/chcore.c ../../ports/AVR/avr_serial.c \
- ../../src/chinit.c ../../src/chdebug.c ../../src/chlists.c ../../src/chdelta.c \
- ../../src/chschd.c ../../src/chthreads.c ../../src/chsem.c ../../src/chmtx.c \
- ../../src/chevents.c ../../src/chmsg.c ../../src/chsleep.c ../../src/chqueues.c \
- ../../src/chserial.c \
+ ${KERNSRC} \
+ ${TESTSRC} \
../../src/lib/evtimer.c \
- ../../test/test.c \
board.c lcd.c main.c
diff --git a/demos/MSP430-MSP430x1611-GCC/Makefile b/demos/MSP430-MSP430x1611-GCC/Makefile index 637a26456..4d2b01bd3 100644 --- a/demos/MSP430-MSP430x1611-GCC/Makefile +++ b/demos/MSP430-MSP430x1611-GCC/Makefile @@ -61,13 +61,15 @@ UDEFS = # Define ASM defines here
UADEFS =
+# Imported source files
+include ../../src/kernel.mk
+include ../../test/test.mk
+
# List ARM-mode C source files here
SRC = ../../ports/MSP430/chcore.c \
- ../../src/chinit.c ../../src/chdebug.c ../../src/chlists.c ../../src/chdelta.c \
- ../../src/chschd.c ../../src/chthreads.c ../../src/chsem.c ../../src/chmtx.c \
- ../../src/chevents.c ../../src/chmsg.c ../../src/chsleep.c ../../src/chqueues.c \
- ../../src/chserial.c \
- ../../src/lib/evtimer.c ../../test/test.c \
+ ${KERNSRC} \
+ ${TESTSRC} \
+ ../../src/lib/evtimer.c \
board.c main.c
# List ASM source files here
diff --git a/demos/Win32-MinGW/Makefile b/demos/Win32-MinGW/Makefile index ea206b0d0..fe06db6e1 100644 --- a/demos/Win32-MinGW/Makefile +++ b/demos/Win32-MinGW/Makefile @@ -55,13 +55,14 @@ UDEFS = # Define ASM defines here
UADEFS =
+# Imported source files
+include ../../src/kernel.mk
+include ../../test/test.mk
+
# List C source files here
-SRC = chcore.c demo.c \
- ../../test/test.c ../../ports/win32/simcom.c \
- ../../src/chinit.c ../../src/chdebug.c ../../src/chlists.c ../../src/chdelta.c \
- ../../src/chschd.c ../../src/chthreads.c ../../src/chsem.c ../../src/chmtx.c \
- ../../src/chevents.c ../../src/chmsg.c ../../src/chsleep.c ../../src/chqueues.c \
- ../../src/chserial.c \
+SRC = chcore.c demo.c ../../ports/win32/simcom.c \
+ ${KERNSRC} \
+ ${TESTSRC}
# List ASM source files here
ASRC = chcore2.s
diff --git a/readme.txt b/readme.txt index e54f5944f..bc8150ecb 100644 --- a/readme.txt +++ b/readme.txt @@ -84,6 +84,8 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process, - FIX: Fixed a problem in the STM32 port USART1 driver.
- Added the definitions for packed structures to the chtypes.h files.
- Fixed a problem in the MMC/SD driver in the LPC2148 demo.
+- Improvements to the makefiles, now each source group has its own .mk include
+ file. Now it is no more required to rewrite everything in each makefile.
*** 0.6.5 ***
- NEW: Web server demo for the AT91SAM7X256, the demo integrates the uIP
diff --git a/src/kernel.mk b/src/kernel.mk new file mode 100644 index 000000000..54a9cffdd --- /dev/null +++ b/src/kernel.mk @@ -0,0 +1,9 @@ +# List of all the ChibiOS/RT kernel files, there is no need to remove the files
+# from this list, you can disable parts of the kernel by editing chconf.h.
+KERNSRC = ../../src/chinit.c ../../src/chdebug.c \
+ ../../src/chlists.c ../../src/chdelta.c \
+ ../../src/chschd.c ../../src/chthreads.c \
+ ../../src/chsem.c ../../src/chmtx.c \
+ ../../src/chevents.c ../../src/chmsg.c \
+ ../../src/chsleep.c ../../src/chqueues.c \
+ ../../src/chserial.c
diff --git a/test/test.mk b/test/test.mk new file mode 100644 index 000000000..ce890a855 --- /dev/null +++ b/test/test.mk @@ -0,0 +1,3 @@ +# List of all the ChibiOS/RT test files.
+TESTSRC = ../../test/test.c ../../test/testrdy.c ../../test/testsem.c \
+ ../../test/testmtx.c ../../test/testmsg.c ../../test/testbmk.c
|