[rtems-libbsd commit] Standardized Makefiles so that i386 would build correctly.
Jennifer Averett
jennifer at rtems.org
Wed May 16 15:17:52 UTC 2012
Module: rtems-libbsd
Branch: master
Commit: 596a7ea5d659552f14be68fab844a8ec5b8fe9c8
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=596a7ea5d659552f14be68fab844a8ec5b8fe9c8
Author: Jennifer Averett <jennifer.averett at oarcorp.com>
Date: Wed May 16 10:21:12 2012 -0500
Standardized Makefiles so that i386 would build correctly.
---
testsuite/Makefile | 2 +-
testsuite/swi01/Makefile | 38 ++++++++++++++++++--------------------
testsuite/timeout01/Makefile | 25 ++++++++++++-------------
testsuite/usb01/Makefile | 35 ++++++++++++-----------------------
4 files changed, 43 insertions(+), 57 deletions(-)
diff --git a/testsuite/Makefile b/testsuite/Makefile
index 287ae97..0fd78c6 100644
--- a/testsuite/Makefile
+++ b/testsuite/Makefile
@@ -8,4 +8,4 @@ include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
include $(RTEMS_CUSTOM)
include $(RTEMS_SHARE)/make/directory.cfg
-SUBDIRS=link01
+SUBDIRS=link01 swi01 timeout01 usb01
diff --git a/testsuite/swi01/Makefile b/testsuite/swi01/Makefile
index dd7c688..f5de48f 100644
--- a/testsuite/swi01/Makefile
+++ b/testsuite/swi01/Makefile
@@ -1,29 +1,27 @@
include ../../config.inc
-include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
-include $(RTEMS_CUSTOM)
-include $(PROJECT_ROOT)/make/leaf.cfg
-
-APP_PIECES = init swi_test
-
-APP_O_FILES = $(APP_PIECES:%=%.o)
-APP_DEP_FILES = $(APP_PIECES:%=%.dep)
+APP=swi01
+PGM=${ARCH}/$(APP).exe
-APP = app.exe
+# optional managers required
+MANAGERS=all
-DEPFLAGS = -MT $@ -MD -MP -MF $*.dep
-AM_CPPFLAGS += -I $(INSTALL_BASE)/include -I.
+# C source names
+C_FILES = init.c swi_test.c
+C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
-CFLAGS += $(DEPFLAGS) $(GCCFLAGS) $(AM_CPPFLAGS) -Wno-unused -Wl,-Map,app.map
+AM_CPPFLAGS += -I $(INSTALL_BASE)/include
+LINK_LIBS += $(INSTALL_BASE)/libbsd.a ${REL_ARGS}
+CFLAGS += $(DEPFLAGS) $(GCCFLAGS) $(AM_CPPFLAGS) -Wno-unused -Wl,-Map,$(APP).map
-LINK_LIBS += $(INSTALL_BASE)/libbsd.a
-
-all: $(APP)
+include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
+include $(RTEMS_CUSTOM)
+include $(PROJECT_ROOT)/make/leaf.cfg
-$(APP): $(APP_O_FILES)
- $(CC) $(CFLAGS) $^ $(LINK_LIBS) -o $(APP)
+OBJS= $(C_O_FILES)
+CLEAN_ADDITIONS += $(APP).map
-clean:
- rm -f app.map $(APP) $(APP_O_FILES) $(APP_DEP_FILES)
+all: ${ARCH} $(PGM)
--include $(APP_DEP_FILES)
+$(PGM): $(OBJS)
+ -$(make-exe)
diff --git a/testsuite/timeout01/Makefile b/testsuite/timeout01/Makefile
index 6e38da1..fb306b5 100644
--- a/testsuite/timeout01/Makefile
+++ b/testsuite/timeout01/Makefile
@@ -1,29 +1,28 @@
include ../../config.inc
+APP = timeout01
+
include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
-APP_PIECES = init timeout_test timeout_helper
-
-APP_O_FILES = $(APP_PIECES:%=%.o)
-APP_DEP_FILES = $(APP_PIECES:%=%.dep)
+C_PIECES = init timeout_test timeout_helper
+C_O_FILES = $(C_PIECES:%=%.o)
+C_DEP_FILES = $(C_PIECES:%=%.dep)
-APP = app.exe
+OBJS= $(C_O_FILES)
DEPFLAGS = -MT $@ -MD -MP -MF $*.dep
AM_CPPFLAGS += -I $(INSTALL_BASE)/include -I.
+CLEAN_ADDITIONS += $(APP).exe $(APP).map $(C_DEP_FILES)
-CFLAGS += $(DEPFLAGS) $(GCCFLAGS) $(AM_CPPFLAGS) -Wno-unused -Wl,-Map,app.map
+CFLAGS += $(DEPFLAGS) $(GCCFLAGS) $(AM_CPPFLAGS) -Wno-unused -Wl,-Map,$(APP).map
LINK_LIBS += $(INSTALL_BASE)/libbsd.a
-all: $(APP)
-
-$(APP): $(APP_O_FILES)
- $(CC) $(CFLAGS) $^ $(LINK_LIBS) -o $(APP)
+all: $(APP).exe
-clean:
- rm -f app.map $(APP) $(APP_O_FILES) $(APP_DEP_FILES)
+$(APP).exe: $(C_O_FILES)
+ $(make-exe)
--include $(APP_DEP_FILES)
+-include $(C_DEP_FILES)
diff --git a/testsuite/usb01/Makefile b/testsuite/usb01/Makefile
index 732a4e3..8adf9c9 100644
--- a/testsuite/usb01/Makefile
+++ b/testsuite/usb01/Makefile
@@ -1,40 +1,29 @@
include ../../config.inc
+APP = usb01
+
include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
-APP_PIECES = init \
- test-file-system
-
-APP_O_FILES = $(APP_PIECES:%=%.o)
-APP_DEP_FILES = $(APP_PIECES:%=%.dep)
+C_PIECES = init test-file-system
+C_O_FILES = $(C_PIECES:%=%.o)
+C_DEP_FILES = $(C_PIECES:%=%.dep)
-APP = app.exe
+OBJS= $(C_O_FILES)
DEPFLAGS = -MT $@ -MD -MP -MF $*.dep
AM_CPPFLAGS += -I $(INSTALL_BASE)/include -I.
+CLEAN_ADDITIONS += $(APP).exe $(APP).map $(C_DEP_FILES)
-CFLAGS += $(DEPFLAGS) $(GCCFLAGS) $(AM_CPPFLAGS) -Wno-unused
+CFLAGS += $(DEPFLAGS) $(GCCFLAGS) $(AM_CPPFLAGS) -Wno-unused -Wl,-Map,$(APP).map
LINK_LIBS += $(INSTALL_BASE)/libbsd.a
-CXXFLAGS += $(CFLAGS)
-
-all: $(APP)
-
-$(APP): $(APP_O_FILES)
- $(CC) $(CXXFLAGS) $^ $(LINK_LIBS) -o $(APP)
-
-clean:
- rm -f $(APP_O_FILES) $(APP_DEP_FILES)
-
-dist:
- cd .. && tar cjf usb-demo/usb-demo.tar.bz2 \
- `find usb-demo -name '*.h' -o -name '*.c'` usb-demo/Makefile
+all: $(APP).exe
-%.dep:
- touch $@
+$(APP).exe: $(C_O_FILES)
+ $(make-exe)
-include $(APP_DEP_FILES)
+-include $(C_DEP_FILES)
More information about the vc
mailing list