[PATCH 1/2] Added conditional compilation of several application

--- app/arm/armtest_leds/Makefile.omk | 10 ++++++++++ app/arm/canldtg/Makefile.omk | 9 +++++++++ app/arm/eb_blink/Makefile.omk | 9 ++++++++- app/arm/interrupt_t0_test/Makefile.omk | 11 +++++++++++ app/arm/minibee/Makefile.omk | 10 +++++++++- app/arm/shodiny/Makefile.omk | 11 +++++++++++ app/arm/smotor/Makefile.omk | 11 ++++++++++- app/arm/test_ARMBoard_pwm/Makefile.omk | 9 +++++++++ app/arm/test_uart/Makefile.omk | 9 +++++++++ 9 files changed, 86 insertions(+), 3 deletions(-) diff --git a/app/arm/armtest_leds/Makefile.omk b/app/arm/armtest_leds/Makefile.omk index 6c49df6..32d892e 100644 --- a/app/arm/armtest_leds/Makefile.omk +++ b/app/arm/armtest_leds/Makefile.omk @@ -1,7 +1,17 @@ # -*- makefile -*- +MY_MACH = lpc21xx +ifeq ($(MACH), $(MY_MACH)) + + #za bin_programs se dava nazev programu bin_PROGRAMS = armtest_leds # za nazev_programu_SOURCES = se davaji vsechny c zdrojaky, ktere se maji prelozit, oddelovac je mezernik armtest_leds_SOURCES = main.c + +else +ifeq ($(RELATIVE_DIR),$(INVOCATION_DIR)) +$(error Not my mach - $(MY_MACH). Not going to compile!) +endif +endif \ No newline at end of file diff --git a/app/arm/canldtg/Makefile.omk b/app/arm/canldtg/Makefile.omk index 224c712..d4ba6ac 100644 --- a/app/arm/canldtg/Makefile.omk +++ b/app/arm/canldtg/Makefile.omk @@ -1,5 +1,8 @@ # -*- makefile -*- +MY_MACH = lpc21xx +ifeq ($(MACH), $(MY_MACH)) + ifdef ID CFLAGS += -DCANLOAD_ID=$(ID) endif @@ -8,3 +11,9 @@ link_VARIANTS = canld bin_PROGRAMS = canldtg canldtg_LIBS = can canldtg_SOURCES = canld_tg.c + +else +ifeq ($(RELATIVE_DIR),$(INVOCATION_DIR)) +$(error Not my mach - $(MY_MACH). Not going to compile!) +endif +endif \ No newline at end of file diff --git a/app/arm/eb_blink/Makefile.omk b/app/arm/eb_blink/Makefile.omk index c547fc6..145f9bd 100644 --- a/app/arm/eb_blink/Makefile.omk +++ b/app/arm/eb_blink/Makefile.omk @@ -1,4 +1,7 @@ # -*- makefile -*- +MY_BOARD = lpc21xx +ifeq ($(BOARD), $(MY_BOARD)) + # eb_blink je nazev programu, pod timto navzem bude systemem prekladan bin_PROGRAMS = eb_blink @@ -7,4 +10,8 @@ bin_PROGRAMS = eb_blink # za nazev_programu_SOURCES se davaji vsechny C zdrojaky, ktere se budou kompilovat eb_blink_SOURCES = main.c - +else +ifeq ($(RELATIVE_DIR),$(INVOCATION_DIR)) +$(error Not my board - $(MY_BOARD). Not going to compile!) +endif +endif diff --git a/app/arm/interrupt_t0_test/Makefile.omk b/app/arm/interrupt_t0_test/Makefile.omk index b2bb5ae..04b587b 100644 --- a/app/arm/interrupt_t0_test/Makefile.omk +++ b/app/arm/interrupt_t0_test/Makefile.omk @@ -1,5 +1,10 @@ # -*- makefile -*- +MY_MACH = lpc21xx +ifeq ($(MACH), $(MY_MACH)) + + + bin_PROGRAMS = interrupt_t0_test interrupt_t0_test_SOURCES = interrupt_t0_test.c @@ -7,3 +12,9 @@ interrupt_t0_test_SOURCES = interrupt_t0_test.c # Switch off compiler optimization and debug info. #OPTIMIZE= #DEBUG= + +else +ifeq ($(RELATIVE_DIR),$(INVOCATION_DIR)) +$(error Not my mach - $(MY_MACH). Not going to compile!) +endif +endif diff --git a/app/arm/minibee/Makefile.omk b/app/arm/minibee/Makefile.omk index 9f263ad..507c634 100644 --- a/app/arm/minibee/Makefile.omk +++ b/app/arm/minibee/Makefile.omk @@ -1,5 +1,9 @@ # -*- makefile -*- +MY_BOARD = lpc21xx +ifeq ($(BOARD), $(MY_BOARD)) + + # eb_blink je nazev programu, pod timto navzem bude systemem prekladan bin_PROGRAMS = minibee @@ -10,4 +14,8 @@ minibee_SOURCES = main.c spi_LPC.c MC1319x.c uart_minibee.c minibee_LIBS = ebb - +else +ifeq ($(RELATIVE_DIR),$(INVOCATION_DIR)) +$(error Not my board - $(MY_BOARD). Not going to compile!) +endif +endif diff --git a/app/arm/shodiny/Makefile.omk b/app/arm/shodiny/Makefile.omk index a6c4911..2b21934 100644 --- a/app/arm/shodiny/Makefile.omk +++ b/app/arm/shodiny/Makefile.omk @@ -1,6 +1,17 @@ # -*- makefile -*- +MY_BOARD = spejblarm +ifeq ($(BOARD), $(MY_BOARD)) + + + bin_PROGRAMS = shodiny shodiny_SOURCES = hodiny.c shodiny_LIBS = can link_VARIANTS = mpram + +else +ifeq ($(RELATIVE_DIR),$(INVOCATION_DIR)) +$(error Not my board - $(MY_BOARD). Not going to compile!) +endif +endif \ No newline at end of file diff --git a/app/arm/smotor/Makefile.omk b/app/arm/smotor/Makefile.omk index f8669f4..94cb2f1 100644 --- a/app/arm/smotor/Makefile.omk +++ b/app/arm/smotor/Makefile.omk @@ -1,6 +1,15 @@ # -*- makefile -*- +MY_BOARD = spejblarm +ifeq ($(BOARD), $(MY_BOARD)) + bin_PROGRAMS = smotor smotor_SOURCES = motor.c pwm.c smotor_LIBS = can -link_VARIANTS = mpram \ No newline at end of file +link_VARIANTS = mpram + +else +ifeq ($(RELATIVE_DIR),$(INVOCATION_DIR)) +$(error Not my board - $(MY_BOARD). Not going to compile!) +endif +endif diff --git a/app/arm/test_ARMBoard_pwm/Makefile.omk b/app/arm/test_ARMBoard_pwm/Makefile.omk index be1655a..6e886ab 100644 --- a/app/arm/test_ARMBoard_pwm/Makefile.omk +++ b/app/arm/test_ARMBoard_pwm/Makefile.omk @@ -1,8 +1,17 @@ # -*- makefile -*- +MY_MACH = lpc21xx +ifeq ($(MACH), $(MY_MACH)) + bin_PROGRAMS = test_ARMBoard_pwm test_ARMBoard_pwm_SOURCES = test_ARMBoard_pwm.c pwm.c #test_LIBS = boot_fn #link_VARIANTS = boot ram bload flash + +else +ifeq ($(RELATIVE_DIR),$(INVOCATION_DIR)) +$(error Not my mach - $(MY_MACH). Not going to compile!) +endif +endif \ No newline at end of file diff --git a/app/arm/test_uart/Makefile.omk b/app/arm/test_uart/Makefile.omk index 7069615..e52e6f1 100644 --- a/app/arm/test_uart/Makefile.omk +++ b/app/arm/test_uart/Makefile.omk @@ -1,5 +1,8 @@ # -*- makefile -*- +MY_MACH = lpc21xx +ifeq ($(MACH), $(MY_MACH)) + bin_PROGRAMS = test_uart test_uart_SOURCES = uart_test.c uartx.c @@ -7,3 +10,9 @@ test_uart_SOURCES = uart_test.c uartx.c # Switch off compiler optimization and debug info. #OPTIMIZE= #DEBUG= + +else +ifeq ($(RELATIVE_DIR),$(INVOCATION_DIR)) +$(error Not my mach - $(MY_MACH). Not going to compile!) +endif +endif \ No newline at end of file -- 1.6.4.4 --- --Pandora3Bndry_12641028971359111003 Content-Type: text/html; charset="ISO-8859-1" <p><div>Tak snad jsem vycytal vsechny mouchy. Nevim jak zrusit ten puvodni patch takze posilam dva:</div><div><br></div><div><br></div><div><br></div><div>From 07614ffec899d1344df7ecdac993b6cc60bcccbb Mon Sep 17 00:00:00 2001 <br> From: Jiri Kubias <<a href="mailto:jiri.kubias@gmail.com">jiri.kubias@gmail.com</a>> <br>Date: Thu, 21 Jan 2010 20:35:24 +0100 <br> Subject: [PATCH 2/2] Added conditional compilation of several application - bug fix <br><br>---<br> app/arm/eb_blink/Makefile.omk | 2 +-<br> app/arm/minibee/Makefile.omk | 2 +-<br> 2 files changed, 2 insertions(+), 2 deletions(-)<br><br>diff --git a/app/arm/eb_blink/Makefile.omk b/app/arm/eb_blink/Makefile.omk<br>index 145f9bd..8d99935 100644<br>--- a/app/arm/eb_blink/Makefile.omk<br>+++ b/app/arm/eb_blink/Makefile.omk<br> @@ -1,5 +1,5 @@<br> # -*- makefile -*-<br>-MY_BOARD = lpc21xx<br>+MY_BOARD = lpceurobot<br> ifeq ($(BOARD), $(MY_BOARD))<br><br><br>diff --git a/app/arm/minibee/Makefile.omk b/app/arm/minibee/Makefile.omk<br>index 507c634..cfab0d6 100644<br> --- a/app/arm/minibee/Makefile.omk<br>+++ b/app/arm/minibee/Makefile.omk<br>@@ -1,6 +1,6 @@<br> # -*- makefile -*-<br><br>-MY_BOARD = lpc21xx<br>+MY_BOARD = lpceurobot<br> ifeq ($(BOARD), $(MY_BOARD))<br><br><br>--<br>1.6.4.4<br> <br></div><div><br></div><div><br></div><div><br></div><div>From f3e1996199869da52384f4c360aa1eecfe4dc1c4 Mon Sep 17 00:00:00 2001 <br>From: Jiri Kubias <<a href="mailto:jiri.kubias@gmail.com">jiri.kubias@gmail.com</a>> <br> Date: Wed, 20 Jan 2010 20:03:22 +0100 <br>Subject: [PATCH 1/2] Added conditional compilation of several application <br> <br>---<br> app/arm/armtest_leds/Makefile.omk | 10 ++++++++++<br> app/arm/canldtg/Makefile.omk | 9 +++++++++ <br> app/arm/eb_blink/Makefile.omk | 9 ++++++++- <br> app/arm/interrupt_t0_test/Makefile.omk | 11 +++++++++++<br> app/arm/minibee/Makefile.omk | 10 +++++++++- <br> app/arm/shodiny/Makefile.omk | 11 +++++++++++<br> app/arm/smotor/Makefile.omk | 11 ++++++++++-<br> app/arm/test_ARMBoard_pwm/Makefile.omk | 9 +++++++++ <br> app/arm/test_uart/Makefile.omk | 9 +++++++++ <br> 9 files changed, 86 insertions(+), 3 deletions(-) <br><br>diff --git a/app/arm/armtest_leds/Makefile.omk b/app/arm/armtest_leds/Makefile.omk<br>index 6c49df6..32d892e 100644 <br> --- a/app/arm/armtest_leds/Makefile.omk <br>+++ b/app/arm/armtest_leds/Makefile.omk <br>@@ -1,7 +1,17 @@ <br> # -*- makefile -*- <br> <br>+MY_MACH = lpc21xx <br> +ifeq ($(MACH), $(MY_MACH)) <br>+ <br>+ <br> #za bin_programs se dava nazev programu <br> bin_PROGRAMS = armtest_leds <br> <br> # za nazev_programu_SOURCES = se davaji vsechny c zdrojaky, ktere se maji prelozit, oddelovac je mezernik<br> armtest_leds_SOURCES = main.c <br> + <br>+else <br> +ifeq ($(RELATIVE_DIR),$(INVOCATION_DIR)) <br>+$(error Not my mach - $(MY_MACH). Not going to compile!) <br> +endif <br>+endif <br> \ No newline at end of file <br>diff --git a/app/arm/canldtg/Makefile.omk b/app/arm/canldtg/Makefile.omk <br> index 224c712..d4ba6ac 100644 <br>--- a/app/arm/canldtg/Makefile.omk <br> +++ b/app/arm/canldtg/Makefile.omk <br>@@ -1,5 +1,8 @@ <br> # -*- makefile -*- <br> <br> +MY_MACH = lpc21xx <br>+ifeq ($(MACH), $(MY_MACH)) <br> + <br> ifdef ID <br> CFLAGS += -DCANLOAD_ID=$(ID) <br> endif <br> @@ -8,3 +11,9 @@ link_VARIANTS = canld <br> bin_PROGRAMS = canldtg <br> canldtg_LIBS = can <br> canldtg_SOURCES = canld_tg.c <br> + <br>+else <br> +ifeq ($(RELATIVE_DIR),$(INVOCATION_DIR)) <br>+$(error Not my mach - $(MY_MACH). Not going to compile!) <br> +endif <br>+endif <br> \ No newline at end of file <br>diff --git a/app/arm/eb_blink/Makefile.omk b/app/arm/eb_blink/Makefile.omk <br> index c547fc6..145f9bd 100644 <br>--- a/app/arm/eb_blink/Makefile.omk <br> +++ b/app/arm/eb_blink/Makefile.omk <br>@@ -1,4 +1,7 @@ <br> # -*- makefile -*- <br>+MY_BOARD = lpc21xx <br> +ifeq ($(BOARD), $(MY_BOARD)) <br>+ <br> <br> # eb_blink je nazev programu, pod timto navzem bude systemem prekladan <br> bin_PROGRAMS = eb_blink <br>@@ -7,4 +10,8 @@ bin_PROGRAMS = eb_blink <br> # za nazev_programu_SOURCES se davaji vsechny C zdrojaky, ktere se budou kompilovat <br> eb_blink_SOURCES = main.c <br> <br>- <br> +else <br>+ifeq ($(RELATIVE_DIR),$(INVOCATION_DIR)) <br> +$(error Not my board - $(MY_BOARD). Not going to compile!) <br>+endif <br> +endif <br>diff --git a/app/arm/interrupt_t0_test/Makefile.omk b/app/arm/interrupt_t0_test/Makefile.omk <br> index b2bb5ae..04b587b 100644 <br>--- a/app/arm/interrupt_t0_test/Makefile.omk <br> +++ b/app/arm/interrupt_t0_test/Makefile.omk <br>@@ -1,5 +1,10 @@ <br> # -*- makefile -*- <br> <br> +MY_MACH = lpc21xx <br>+ifeq ($(MACH), $(MY_MACH)) <br> + <br>+ <br> + <br> bin_PROGRAMS = interrupt_t0_test <br> <br> interrupt_t0_test_SOURCES = interrupt_t0_test.c <br> @@ -7,3 +12,9 @@ interrupt_t0_test_SOURCES = interrupt_t0_test.c <br> # Switch off compiler optimization and debug info. <br> #OPTIMIZE= <br> #DEBUG= <br> + <br>+else <br> +ifeq ($(RELATIVE_DIR),$(INVOCATION_DIR)) <br>+$(error Not my mach - $(MY_MACH). Not going to compile!) <br> +endif <br>+endif <br> diff --git a/app/arm/minibee/Makefile.omk b/app/arm/minibee/Makefile.omk <br>index 9f263ad..507c634 100644 <br> --- a/app/arm/minibee/Makefile.omk <br>+++ b/app/arm/minibee/Makefile.omk <br> @@ -1,5 +1,9 @@ <br> # -*- makefile -*- <br> <br>+MY_BOARD = lpc21xx <br> +ifeq ($(BOARD), $(MY_BOARD)) <br>+ <br> + <br> # eb_blink je nazev programu, pod timto navzem bude systemem prekladan <br> bin_PROGRAMS = minibee <br> <br> @@ -10,4 +14,8 @@ minibee_SOURCES = main.c spi_LPC.c MC1319x.c uart_minibee.c <br> <br> minibee_LIBS = ebb <br> <br> - <br>+else <br> +ifeq ($(RELATIVE_DIR),$(INVOCATION_DIR)) <br>+$(error Not my board - $(MY_BOARD). Not going to compile!) <br> +endif <br>+endif <br> diff --git a/app/arm/shodiny/Makefile.omk b/app/arm/shodiny/Makefile.omk <br>index a6c4911..2b21934 100644 <br> --- a/app/arm/shodiny/Makefile.omk <br>+++ b/app/arm/shodiny/Makefile.omk <br> @@ -1,6 +1,17 @@ <br> # -*- makefile -*- <br> <br>+MY_BOARD = spejblarm <br> +ifeq ($(BOARD), $(MY_BOARD)) <br>+ <br> + <br>+ <br> bin_PROGRAMS = shodiny <br> shodiny_SOURCES = hodiny.c <br> shodiny_LIBS = can <br> link_VARIANTS = mpram <br> + <br>+else <br> +ifeq ($(RELATIVE_DIR),$(INVOCATION_DIR)) <br>+$(error Not my board - $(MY_BOARD). Not going to compile!) <br> +endif <br>+endif <br> \ No newline at end of file <br>diff --git a/app/arm/smotor/Makefile.omk b/app/arm/smotor/Makefile.omk <br> index f8669f4..94cb2f1 100644 <br>--- a/app/arm/smotor/Makefile.omk <br> +++ b/app/arm/smotor/Makefile.omk <br>@@ -1,6 +1,15 @@ <br> # -*- makefile -*- <br>+MY_BOARD = spejblarm <br> +ifeq ($(BOARD), $(MY_BOARD)) <br>+ <br> <br> bin_PROGRAMS = smotor <br> smotor_SOURCES = motor.c pwm.c <br> smotor_LIBS = can <br> -link_VARIANTS = mpram <br>\ No newline at end of file <br> +link_VARIANTS = mpram <br>+ <br> +else <br>+ifeq ($(RELATIVE_DIR),$(INVOCATION_DIR)) <br> +$(error Not my board - $(MY_BOARD). Not going to compile!) <br>+endif <br> +endif <br>diff --git a/app/arm/test_ARMBoard_pwm/Makefile.omk b/app/arm/test_ARMBoard_pwm/Makefile.omk <br> index be1655a..6e886ab 100644 <br>--- a/app/arm/test_ARMBoard_pwm/Makefile.omk <br> +++ b/app/arm/test_ARMBoard_pwm/Makefile.omk <br>@@ -1,8 +1,17 @@ <br> # -*- makefile -*- <br> <br> +MY_MACH = lpc21xx <br>+ifeq ($(MACH), $(MY_MACH)) <br> + <br> bin_PROGRAMS = test_ARMBoard_pwm <br> <br> test_ARMBoard_pwm_SOURCES = test_ARMBoard_pwm.c pwm.c <br> #test_LIBS = boot_fn <br> <br> #link_VARIANTS = boot ram bload flash <br>+ <br> +else <br>+ifeq ($(RELATIVE_DIR),$(INVOCATION_DIR))<br>+$(error Not my mach - $(MY_MACH). Not going to compile!)<br>+endif<br> +endif<br>\ No newline at end of file<br>diff --git a/app/arm/test_uart/Makefile.omk b/app/arm/test_uart/Makefile.omk<br>index 7069615..e52e6f1 100644<br>--- a/app/arm/test_uart/Makefile.omk<br>+++ b/app/arm/test_uart/Makefile.omk<br> @@ -1,5 +1,8 @@<br> # -*- makefile -*-<br><br>+MY_MACH = lpc21xx<br>+ifeq ($(MACH), $(MY_MACH))<br>+<br> bin_PROGRAMS = test_uart<br><br> test_uart_SOURCES = uart_test.c uartx.c<br>@@ -7,3 +10,9 @@ test_uart_SOURCES = uart_test.c uartx.c<br> # Switch off compiler optimization and debug info.<br> #OPTIMIZE=<br> #DEBUG=<br>+<br>+else<br>+ifeq ($(RELATIVE_DIR),$(INVOCATION_DIR))<br>+$(error Not my mach - $(MY_MACH). Not going to compile!)<br>+endif<br>+endif<br> \ No newline at end of file<br>--<br>1.6.4.4<br><br></div><div><br></div><div><br></div> <pre></pre><p><br>--- <br> --Pandora3Bndry_12641028971359111003--
participants (1)
-
Jiri Kubias