mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-05-13 20:19:19 +08:00
Standardized Makefiles so that i386 would build correctly.
This commit is contained in:
parent
758649212b
commit
596a7ea5d6
@ -8,4 +8,4 @@ include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
|
|||||||
include $(RTEMS_CUSTOM)
|
include $(RTEMS_CUSTOM)
|
||||||
include $(RTEMS_SHARE)/make/directory.cfg
|
include $(RTEMS_SHARE)/make/directory.cfg
|
||||||
|
|
||||||
SUBDIRS=link01
|
SUBDIRS=link01 swi01 timeout01 usb01
|
||||||
|
@ -1,29 +1,27 @@
|
|||||||
include ../../config.inc
|
include ../../config.inc
|
||||||
|
|
||||||
|
APP=swi01
|
||||||
|
PGM=${ARCH}/$(APP).exe
|
||||||
|
|
||||||
|
# optional managers required
|
||||||
|
MANAGERS=all
|
||||||
|
|
||||||
|
# C source names
|
||||||
|
C_FILES = init.c swi_test.c
|
||||||
|
C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
|
include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
|
||||||
include $(RTEMS_CUSTOM)
|
include $(RTEMS_CUSTOM)
|
||||||
include $(PROJECT_ROOT)/make/leaf.cfg
|
include $(PROJECT_ROOT)/make/leaf.cfg
|
||||||
|
|
||||||
APP_PIECES = init swi_test
|
OBJS= $(C_O_FILES)
|
||||||
|
CLEAN_ADDITIONS += $(APP).map
|
||||||
|
|
||||||
APP_O_FILES = $(APP_PIECES:%=%.o)
|
all: ${ARCH} $(PGM)
|
||||||
APP_DEP_FILES = $(APP_PIECES:%=%.dep)
|
|
||||||
|
|
||||||
APP = app.exe
|
$(PGM): $(OBJS)
|
||||||
|
-$(make-exe)
|
||||||
DEPFLAGS = -MT $@ -MD -MP -MF $*.dep
|
|
||||||
AM_CPPFLAGS += -I $(INSTALL_BASE)/include -I.
|
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f app.map $(APP) $(APP_O_FILES) $(APP_DEP_FILES)
|
|
||||||
|
|
||||||
-include $(APP_DEP_FILES)
|
|
||||||
|
@ -1,29 +1,28 @@
|
|||||||
include ../../config.inc
|
include ../../config.inc
|
||||||
|
|
||||||
|
APP = timeout01
|
||||||
|
|
||||||
include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
|
include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
|
||||||
include $(RTEMS_CUSTOM)
|
include $(RTEMS_CUSTOM)
|
||||||
include $(PROJECT_ROOT)/make/leaf.cfg
|
include $(PROJECT_ROOT)/make/leaf.cfg
|
||||||
|
|
||||||
APP_PIECES = init timeout_test timeout_helper
|
C_PIECES = init timeout_test timeout_helper
|
||||||
|
C_O_FILES = $(C_PIECES:%=%.o)
|
||||||
|
C_DEP_FILES = $(C_PIECES:%=%.dep)
|
||||||
|
|
||||||
APP_O_FILES = $(APP_PIECES:%=%.o)
|
OBJS= $(C_O_FILES)
|
||||||
APP_DEP_FILES = $(APP_PIECES:%=%.dep)
|
|
||||||
|
|
||||||
APP = app.exe
|
|
||||||
|
|
||||||
DEPFLAGS = -MT $@ -MD -MP -MF $*.dep
|
DEPFLAGS = -MT $@ -MD -MP -MF $*.dep
|
||||||
AM_CPPFLAGS += -I $(INSTALL_BASE)/include -I.
|
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
|
LINK_LIBS += $(INSTALL_BASE)/libbsd.a
|
||||||
|
|
||||||
all: $(APP)
|
all: $(APP).exe
|
||||||
|
|
||||||
$(APP): $(APP_O_FILES)
|
$(APP).exe: $(C_O_FILES)
|
||||||
$(CC) $(CFLAGS) $^ $(LINK_LIBS) -o $(APP)
|
$(make-exe)
|
||||||
|
|
||||||
clean:
|
-include $(C_DEP_FILES)
|
||||||
rm -f app.map $(APP) $(APP_O_FILES) $(APP_DEP_FILES)
|
|
||||||
|
|
||||||
-include $(APP_DEP_FILES)
|
|
||||||
|
@ -1,40 +1,29 @@
|
|||||||
|
|
||||||
include ../../config.inc
|
include ../../config.inc
|
||||||
|
|
||||||
|
APP = usb01
|
||||||
|
|
||||||
include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
|
include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
|
||||||
include $(RTEMS_CUSTOM)
|
include $(RTEMS_CUSTOM)
|
||||||
include $(PROJECT_ROOT)/make/leaf.cfg
|
include $(PROJECT_ROOT)/make/leaf.cfg
|
||||||
|
|
||||||
APP_PIECES = init \
|
C_PIECES = init test-file-system
|
||||||
test-file-system
|
C_O_FILES = $(C_PIECES:%=%.o)
|
||||||
|
C_DEP_FILES = $(C_PIECES:%=%.dep)
|
||||||
|
|
||||||
APP_O_FILES = $(APP_PIECES:%=%.o)
|
OBJS= $(C_O_FILES)
|
||||||
APP_DEP_FILES = $(APP_PIECES:%=%.dep)
|
|
||||||
|
|
||||||
APP = app.exe
|
|
||||||
|
|
||||||
DEPFLAGS = -MT $@ -MD -MP -MF $*.dep
|
DEPFLAGS = -MT $@ -MD -MP -MF $*.dep
|
||||||
AM_CPPFLAGS += -I $(INSTALL_BASE)/include -I.
|
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
|
LINK_LIBS += $(INSTALL_BASE)/libbsd.a
|
||||||
|
|
||||||
CXXFLAGS += $(CFLAGS)
|
all: $(APP).exe
|
||||||
|
|
||||||
all: $(APP)
|
$(APP).exe: $(C_O_FILES)
|
||||||
|
$(make-exe)
|
||||||
|
|
||||||
$(APP): $(APP_O_FILES)
|
-include $(C_DEP_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
|
|
||||||
|
|
||||||
%.dep:
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
include $(APP_DEP_FILES)
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user