Flesh out examples/nxflat build environment
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1921 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
421102ec4a
commit
bb480457bd
@ -71,6 +71,12 @@ CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \
|
||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld \
|
||||
-no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
@ -95,6 +95,12 @@ CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \
|
||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld \
|
||||
-no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
@ -95,6 +95,12 @@ CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \
|
||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld \
|
||||
-no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
@ -95,6 +95,12 @@ CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \
|
||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld \
|
||||
-no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
@ -98,6 +98,12 @@ CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \
|
||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld \
|
||||
-no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
@ -95,6 +95,12 @@ CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \
|
||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld \
|
||||
-no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
@ -107,6 +107,12 @@ CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \
|
||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld \
|
||||
-no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
@ -107,6 +107,12 @@ CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \
|
||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld \
|
||||
-no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
@ -107,6 +107,12 @@ CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \
|
||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld \
|
||||
-no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
@ -107,6 +107,12 @@ CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \
|
||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld \
|
||||
-no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
@ -81,6 +81,12 @@ CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \
|
||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld \
|
||||
-no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
@ -72,6 +72,12 @@ CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \
|
||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld \
|
||||
-no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
@ -72,6 +72,12 @@ CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \
|
||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld \
|
||||
-no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
@ -72,6 +72,12 @@ CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \
|
||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld \
|
||||
-no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
@ -72,6 +72,12 @@ CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \
|
||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld \
|
||||
-no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
@ -72,6 +72,12 @@ CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \
|
||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld \
|
||||
-no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
@ -72,6 +72,12 @@ CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \
|
||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld \
|
||||
-no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
@ -107,6 +107,12 @@ CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \
|
||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld \
|
||||
-no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
@ -107,6 +107,12 @@ CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \
|
||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld \
|
||||
-no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* null_main.c
|
||||
/****************************************************************************
|
||||
* examples/null/null_main.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -31,43 +31,43 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: user_initialize
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
void user_initialize(void)
|
||||
{
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: user_start
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
int user_start(int argc, char *argv[])
|
||||
{
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
ASRCS =
|
||||
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
||||
CSRCS =
|
||||
CSRCS = nxflat_main.c
|
||||
COBJS = $(CSRCS:.c=$(OBJEXT))
|
||||
|
||||
SRCS = $(ASRCS) $(CSRCS)
|
||||
@ -47,6 +47,7 @@ OBJS = $(AOBJS) $(COBJS)
|
||||
BIN = lib$(CONFIG_EXAMPLE)$(LIBEXT)
|
||||
|
||||
all: $(BIN)
|
||||
.PHONY: tests/romfs.h tests/dirlist.h clean distclean
|
||||
|
||||
$(AOBJS): %$(OBJEXT): %.S
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
@ -54,7 +55,10 @@ $(AOBJS): %$(OBJEXT): %.S
|
||||
$(COBJS): %$(OBJEXT): %.c
|
||||
$(call COMPILE, $<, $@)
|
||||
|
||||
$(BIN): $(OBJS)
|
||||
headers:
|
||||
@$(MAKE) -C tests TOPDIR=$(TOPDIR) CROSSDEV=$(CROSSDEV)
|
||||
|
||||
$(BIN): headers $(OBJS)
|
||||
@( for obj in $(OBJS) ; do \
|
||||
$(call ARCHIVE, $@, $${obj}); \
|
||||
done ; )
|
||||
|
83
examples/nxflat/nxflat_main.c
Normal file
83
examples/nxflat/nxflat_main.c
Normal file
@ -0,0 +1,83 @@
|
||||
/****************************************************************************
|
||||
* examples/nxflat/nxflat_main.c
|
||||
*
|
||||
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <debug.h>
|
||||
|
||||
#include "tests/romfs.h"
|
||||
#include "tests/dirlist.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: user_initialize
|
||||
****************************************************************************/
|
||||
|
||||
void user_initialize(void)
|
||||
{
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: user_start
|
||||
****************************************************************************/
|
||||
|
||||
int user_start(int argc, char *argv[])
|
||||
{
|
||||
return 0;
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
############################################################################
|
||||
# examples/nxflat/Make.defs
|
||||
#
|
||||
# Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
NXFLATCC = $(CC)
|
||||
NXFLATCFLAGS = $(CPICFLAGS)
|
||||
NXFLATCXX = $(CXX)
|
||||
NXFLATCXXFLAGS = $(CXXPICFLAGS)
|
||||
|
||||
NXFLATLD = $(LD)
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T $(TOPDIR)/examples/nxflat/tests/nxflat.ld -no-check-sections
|
||||
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
@ -35,7 +35,6 @@
|
||||
|
||||
-include $(TOPDIR)/.config # Current configuration
|
||||
-include $(TOPDIR)/Make.defs # Basic make info
|
||||
include ../Make.defs # NXFLAT make info
|
||||
|
||||
BIN = errno
|
||||
|
||||
@ -48,26 +47,32 @@ R2OBJ = $(R2SRC:.S=.o)
|
||||
all: $(BIN)
|
||||
|
||||
$(R1OBJS): %.o: %.c
|
||||
$(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
|
||||
@echo "CC: $<"
|
||||
@$(CC) -c $(CPICFLAGS) $< -o $@
|
||||
|
||||
$(R2OBJ): %.o: %.S
|
||||
$(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
|
||||
@echo "AS: $<"
|
||||
@$(CC) -c $(CPICFLAGS) $< -o $@
|
||||
|
||||
$(BIN).r1: $(R1OBJS)
|
||||
$(NXFLATLD) $(NXFLATLDFLAGS1) -o $@ $^
|
||||
@echo "LD: $<"
|
||||
@$(LD) $(NXFLATLDFLAGS1) -o $@ $^
|
||||
|
||||
$(R2SRC): $(BIN).r1
|
||||
$(MKNXFLAT) -o $@ $^
|
||||
@echo "MK: $<"
|
||||
@$(MKNXFLAT) -o $@ $^
|
||||
|
||||
$(BIN).r2: $(R2OBJ)
|
||||
$(NXFLATLD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
|
||||
@echo "LD: $<"
|
||||
@$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
|
||||
|
||||
$(BIN): $(BIN).r2
|
||||
$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
|
||||
@echo "LD: $<"
|
||||
@$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
|
||||
|
||||
clean:
|
||||
rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
|
||||
@rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
|
||||
|
||||
install:
|
||||
install -D $(BIN) $(ROMFS_DIR)/$(BIN)
|
||||
@install -D $(BIN) $(ROMFS_DIR)/$(BIN)
|
||||
|
||||
|
@ -35,7 +35,6 @@
|
||||
|
||||
-include $(TOPDIR)/.config # Current configuration
|
||||
-include $(TOPDIR)/Make.defs # Basic make info
|
||||
include ../Make.defs # NXFLAT make info
|
||||
|
||||
BIN1 = hello++1
|
||||
BIN2 = hello++2
|
||||
@ -74,16 +73,18 @@ LIBSTDC_STUBS_LIB = $(LIBSTDC_STUBS_DIR)/liblibxx.a
|
||||
all: $(BIN1) $(BIN2) $(BIN3) # $(BIN4)
|
||||
|
||||
$(R1CXXOBJS): %.o: %.cpp
|
||||
$(NXFLATCXX) -c $(NXFLATCXXFLAGS) $< -o $@
|
||||
@echo "CC: $<"
|
||||
@$(CXX) -c $(CXXPICFLAGS) $< -o $@
|
||||
|
||||
$(R2AOBJS): %.o: %.S
|
||||
$(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
|
||||
@echo "AS: $<"
|
||||
@$(CC) -c $(CPICFLAGS) $< -o $@
|
||||
|
||||
# This contains libstdc++ stubs to that you can build C++ code
|
||||
# without actually having libstdc++
|
||||
|
||||
$(LIBSTDC_STUBS_LIB):
|
||||
$(MAKE) -C $(LIBSTDC_STUBS_DIR) TOPDIR=$(TOPDIR)
|
||||
@$(MAKE) -C $(LIBSTDC_STUBS_DIR) TOPDIR=$(TOPDIR)
|
||||
|
||||
# BIN1 and BIN2 link just like C code because they contain no
|
||||
# static constructors. BIN1 is equivalent to a C hello world;
|
||||
@ -91,28 +92,35 @@ $(LIBSTDC_STUBS_LIB):
|
||||
# not statically initialized.
|
||||
|
||||
$(BIN1).r1: $(R1OBJS1)
|
||||
$(NXFLATLD) $(NXFLATLDFLAGS1) -o $@ $^
|
||||
@echo "LD: $<"
|
||||
@$(LD) $(NXFLATLDFLAGS1) -o $@ $^
|
||||
|
||||
$(R2SRC1): $(BIN1).r1
|
||||
$(MKNXFLAT) -o $@ $^
|
||||
@echo "MK: $<"
|
||||
@$(MKNXFLAT) -o $@ $^
|
||||
|
||||
$(BIN1).r2: $(R2OBJ1)
|
||||
$(NXFLATLD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS1) $(R2OBJ1)
|
||||
@echo "LD: $<"
|
||||
@$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS1) $(R2OBJ1)
|
||||
|
||||
$(BIN1): $(BIN1).r2
|
||||
$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
|
||||
@echo "LD: $<"
|
||||
@$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
|
||||
|
||||
$(BIN2).r1: $(R1OBJS2) $(LIBSTDC_STUBS_LIB)
|
||||
$(NXFLATLD) $(NXFLATLDFLAGS1) -o $@ $^
|
||||
@echo "LD: $<"
|
||||
@$(LD) $(NXFLATLDFLAGS1) -o $@ $^
|
||||
|
||||
$(R2SRC2): $(BIN2).r1
|
||||
$(MKNXFLAT) -o $@ $^
|
||||
@echo "MK: $<"
|
||||
@$(MKNXFLAT) -o $@ $^
|
||||
|
||||
$(BIN2).r2: $(R2OBJ2)
|
||||
$(NXFLATLD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS2) $(R2OBJ2)
|
||||
@$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS2) $(R2OBJ2)
|
||||
|
||||
(BIN2): $(BIN2).r2
|
||||
$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
|
||||
$(BIN2): $(BIN2).r2
|
||||
@echo "LD: $<"
|
||||
@$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
|
||||
|
||||
# BIN3 and BIN4 require that we include --cxx in the xflat-ld command.
|
||||
# This will instruct xflat-ld that we want it to put togethe the correct
|
||||
@ -121,41 +129,48 @@ $(BIN2).r2: $(R2OBJ2)
|
||||
# BIN3 is equivalent to BIN2 except that is uses static initializers
|
||||
|
||||
$(BIN3).r1: $(R1OBJS3) $(LIBSTDC_STUBS_LIB)
|
||||
$(NXFLATLD) $(NXFLATLDFLAGS1) -o $@ $^
|
||||
@echo "LD: $<"
|
||||
@$(LD) $(NXFLATLDFLAGS1) -o $@ $^
|
||||
|
||||
$(R2SRC3): $(BIN3).r1
|
||||
$(MKNXFLAT) -o $@ $^
|
||||
@echo "MK: $<"
|
||||
@$(MKNXFLAT) -o $@ $^
|
||||
|
||||
$(BIN3).r2: $(R2OBJ3)
|
||||
$(NXFLATLD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS3) $(R2OBJ3)
|
||||
@echo "LD: $<"
|
||||
@$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS3) $(R2OBJ3)
|
||||
|
||||
$(BIN3): $(BIN3).r2
|
||||
$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
|
||||
@echo "LD: $<"
|
||||
@$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
|
||||
|
||||
# BIN4 is similar to BIN3 except that it uses the streams code from libstdc++
|
||||
#
|
||||
# NOTE: libstdc++ is not available for XFLAT as of this writing
|
||||
#
|
||||
#$(BIN4).r1: $(R1OBJS4) $(LIBSTDC_STUBS_LIB)
|
||||
# $(NXFLATLD) $(NXFLATLDFLAGS1) -o $@ $^
|
||||
# @echo "LD: $<"
|
||||
# $(LD) $(NXFLATLDFLAGS1) -o $@ $^
|
||||
#
|
||||
#$(R2SRC4): $(BIN4).r1
|
||||
# @echo "MK: $<"
|
||||
# $(MKNXFLAT) -o $@ $^
|
||||
#
|
||||
#$(BIN4).r2: $(R2OBJ4)
|
||||
# $(NXFLATLD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS4) $(R2OBJ4)
|
||||
#$(BIN4).r2: $(R2OBJ4)# @echo "LD: $<"
|
||||
# $(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS4) $(R2OBJ4)
|
||||
#
|
||||
#$(BIN4): $(BIN4).r2
|
||||
# @echo "LD: $<"
|
||||
# $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
|
||||
|
||||
clean:
|
||||
rm -f $(ALL_BIN) $(DERIVED) *.o *.r1 *.r2 *~ .*.swp core
|
||||
@rm -f $(ALL_BIN) $(DERIVED) *.o *.r1 *.r2 *~ .*.swp core
|
||||
|
||||
install: $(ALL_BIN)
|
||||
install -D $(BIN1) $(ROMFS_DIR)/$(BIN1)
|
||||
install -D $(BIN2) $(ROMFS_DIR)/$(BIN2)
|
||||
install -D $(BIN3) $(ROMFS_DIR)/$(BIN3)
|
||||
# install -D $(BIN4) $(ROMFS_DIR)/$(BIN4)
|
||||
@install -D $(BIN1) $(ROMFS_DIR)/$(BIN1)
|
||||
@install -D $(BIN2) $(ROMFS_DIR)/$(BIN2)
|
||||
@install -D $(BIN3) $(ROMFS_DIR)/$(BIN3)
|
||||
# @install -D $(BIN4) $(ROMFS_DIR)/$(BIN4)
|
||||
|
||||
|
||||
|
||||
|
@ -35,7 +35,6 @@
|
||||
|
||||
-include $(TOPDIR)/.config # Current configuration
|
||||
-include $(TOPDIR)/Make.defs # Basic make info
|
||||
include ../Make.defs # NXFLAT make info
|
||||
|
||||
BIN = hello
|
||||
|
||||
@ -48,26 +47,32 @@ R2OBJ = $(R2SRC:.S=.o)
|
||||
all: $(BIN)
|
||||
|
||||
$(R1OBJS): %.o: %.c
|
||||
$(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
|
||||
@echo "CC: $<"
|
||||
@$(CC) -c $(CPICFLAGS) $< -o $@
|
||||
|
||||
$(R2OBJ): %.o: %.S
|
||||
$(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
|
||||
@echo "AS: $<"
|
||||
@$(CC) -c $(CPICFLAGS) $< -o $@
|
||||
|
||||
$(BIN).r1: $(R1OBJS)
|
||||
$(NXFLATLD) $(NXFLATLDFLAGS1) -o $@ $^
|
||||
@echo "LD: $<"
|
||||
@$(LD) $(NXFLATLDFLAGS1) -o $@ $^
|
||||
|
||||
$(R2SRC): $(BIN).r1
|
||||
$(MKNXFLAT) -o $@ $^
|
||||
@echo "MK: $<"
|
||||
@$(MKNXFLAT) -o $@ $^
|
||||
|
||||
$(BIN).r2: $(R2OBJ)
|
||||
$(NXFLATLD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
|
||||
@echo "LD: $<"
|
||||
@$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
|
||||
|
||||
$(BIN): $(BIN).r2
|
||||
$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
|
||||
@echo "LD: $<"
|
||||
@$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
|
||||
|
||||
clean:
|
||||
rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
|
||||
@rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
|
||||
|
||||
install:
|
||||
install -D $(BIN) $(ROMFS_DIR)/$(BIN)
|
||||
@install -D $(BIN) $(ROMFS_DIR)/$(BIN)
|
||||
|
||||
|
@ -35,7 +35,6 @@
|
||||
|
||||
-include $(TOPDIR)/.config # Current configuration
|
||||
-include $(TOPDIR)/Make.defs # Basic make info
|
||||
include ../Make.defs # NXFLAT make info
|
||||
|
||||
BIN = longjmp
|
||||
|
||||
@ -48,26 +47,32 @@ R2OBJ = $(R2SRC:.S=.o)
|
||||
all: $(BIN)
|
||||
|
||||
$(R1OBJS): %.o: %.c
|
||||
$(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
|
||||
@echo "CC: $<"
|
||||
@$(CC) -c $(CPICFLAGS) $< -o $@
|
||||
|
||||
$(R2OBJ): %.o: %.S
|
||||
$(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
|
||||
@echo "AS: $<"
|
||||
@$(CC) -c $(CPICFLAGS) $< -o $@
|
||||
|
||||
$(BIN).r1: $(R1OBJS)
|
||||
$(NXFLATLD) $(NXFLATLDFLAGS1) -o $@ $^
|
||||
@echo "LD: $<"
|
||||
@$(LD) $(NXFLATLDFLAGS1) -o $@ $^
|
||||
|
||||
$(R2SRC): $(BIN).r1
|
||||
$(MKNXFLAT) -o $@ $^
|
||||
@echo "MK: $<"
|
||||
@$(MKNXFLAT) -o $@ $^
|
||||
|
||||
$(BIN).r2: $(R2OBJ)
|
||||
$(NXFLATLD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
|
||||
@echo "LD: $<"
|
||||
@$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
|
||||
|
||||
$(BIN): $(BIN).r2
|
||||
$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
|
||||
@echo "LD: $<"
|
||||
@$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
|
||||
|
||||
clean:
|
||||
rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
|
||||
@rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
|
||||
|
||||
install:
|
||||
install -D $(BIN) $(ROMFS_DIR)/$(BIN)
|
||||
@install -D $(BIN) $(ROMFS_DIR)/$(BIN)
|
||||
|
||||
|
@ -35,7 +35,6 @@
|
||||
|
||||
-include $(TOPDIR)/.config # Current configuration
|
||||
-include $(TOPDIR)/Make.defs # Basic make info
|
||||
include ../Make.defs # NXFLAT make info
|
||||
|
||||
BIN = mutex
|
||||
|
||||
@ -48,26 +47,32 @@ R2OBJ = $(R2SRC:.S=.o)
|
||||
all: $(BIN)
|
||||
|
||||
$(R1OBJS): %.o: %.c
|
||||
$(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
|
||||
@echo "CC: $<"
|
||||
@$(CC) -c $(CPICFLAGS) $< -o $@
|
||||
|
||||
$(R2OBJ): %.o: %.S
|
||||
$(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
|
||||
@echo "AS: $<"
|
||||
@$(CC) -c $(CPICFLAGS) $< -o $@
|
||||
|
||||
$(BIN).r1: $(R1OBJS)
|
||||
$(NXFLATLD) $(NXFLATLDFLAGS1) -o $@ $^
|
||||
@echo "LD: $<"
|
||||
@$(LD) $(NXFLATLDFLAGS1) -o $@ $^
|
||||
|
||||
$(R2SRC): $(BIN).r1
|
||||
$(MKNXFLAT) -o $@ $^
|
||||
@echo "MK: $<"
|
||||
@$(MKNXFLAT) -o $@ $^
|
||||
|
||||
$(BIN).r2: $(R2OBJ)
|
||||
$(NXFLATLD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
|
||||
@echo "LD: $<"
|
||||
@$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
|
||||
|
||||
$(BIN): $(BIN).r2
|
||||
$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
|
||||
@echo "LD: $<"
|
||||
@$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
|
||||
|
||||
clean:
|
||||
rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
|
||||
@rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
|
||||
|
||||
install:
|
||||
install -D $(BIN) $(ROMFS_DIR)/$(BIN)
|
||||
@install -D $(BIN) $(ROMFS_DIR)/$(BIN)
|
||||
|
||||
|
@ -35,7 +35,6 @@
|
||||
|
||||
-include $(TOPDIR)/.config # Current configuration
|
||||
-include $(TOPDIR)/Make.defs # Basic make info
|
||||
include ../Make.defs # NXFLAT make info
|
||||
|
||||
BIN = pthread
|
||||
|
||||
@ -48,26 +47,32 @@ R2OBJ = $(R2SRC:.S=.o)
|
||||
all: $(BIN)
|
||||
|
||||
$(R1OBJS): %.o: %.c
|
||||
$(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
|
||||
@echo "CC: $<"
|
||||
@$(CC) -c $(CPICFLAGS) $< -o $@
|
||||
|
||||
$(R2OBJ): %.o: %.S
|
||||
$(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
|
||||
@echo "AS: $<"
|
||||
@$(CC) -c $(CPICFLAGS) $< -o $@
|
||||
|
||||
$(BIN).r1: $(R1OBJS)
|
||||
$(NXFLATLD) $(NXFLATLDFLAGS1) -o $@ $^
|
||||
@echo "LD: $<"
|
||||
@$(LD) $(NXFLATLDFLAGS1) -o $@ $^
|
||||
|
||||
$(R2SRC): $(BIN).r1
|
||||
$(MKNXFLAT) -o $@ $^
|
||||
@echo "MK: $<"
|
||||
@$(MKNXFLAT) -o $@ $^
|
||||
|
||||
$(BIN).r2: $(R2OBJ)
|
||||
$(NXFLATLD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
|
||||
@echo "LD: $<"
|
||||
@$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
|
||||
|
||||
$(BIN): $(BIN).r2
|
||||
$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
|
||||
@echo "LD: $<"
|
||||
@$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
|
||||
|
||||
clean:
|
||||
rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
|
||||
@rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
|
||||
|
||||
install:
|
||||
install -D $(BIN) $(ROMFS_DIR)/$(BIN)
|
||||
@install -D $(BIN) $(ROMFS_DIR)/$(BIN)
|
||||
|
||||
|
@ -35,7 +35,6 @@
|
||||
|
||||
-include $(TOPDIR)/.config # Current configuration
|
||||
-include $(TOPDIR)/Make.defs # Basic make info
|
||||
include ../Make.defs # NXFLAT make info
|
||||
|
||||
BIN = signal
|
||||
|
||||
@ -48,26 +47,32 @@ R2OBJ = $(R2SRC:.S=.o)
|
||||
all: $(BIN)
|
||||
|
||||
$(R1OBJS): %.o: %.c
|
||||
$(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
|
||||
@echo "CC: $<"
|
||||
@$(CC) -c $(CPICFLAGS) $< -o $@
|
||||
|
||||
$(R2OBJ): %.o: %.S
|
||||
$(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
|
||||
@echo "AS: $<"
|
||||
@$(CC) -c $(CPICFLAGS) $< -o $@
|
||||
|
||||
$(BIN).r1: $(R1OBJS)
|
||||
$(NXFLATLD) $(NXFLATLDFLAGS1) -o $@ $^
|
||||
@echo "LD: $<"
|
||||
@$(LD) $(NXFLATLDFLAGS1) -o $@ $^
|
||||
|
||||
$(R2SRC): $(BIN).r1
|
||||
$(MKNXFLAT) -o $@ $^
|
||||
@echo "MK: $<"
|
||||
@$(MKNXFLAT) -o $@ $^
|
||||
|
||||
$(BIN).r2: $(R2OBJ)
|
||||
$(NXFLATLD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
|
||||
@echo "LD: $<"
|
||||
@$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
|
||||
|
||||
$(BIN): $(BIN).r2
|
||||
$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
|
||||
@echo "LD: $<"
|
||||
@$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
|
||||
|
||||
clean:
|
||||
rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
|
||||
@rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
|
||||
|
||||
install:
|
||||
install -D $(BIN) $(ROMFS_DIR)/$(BIN)
|
||||
@install -D $(BIN) $(ROMFS_DIR)/$(BIN)
|
||||
|
||||
|
@ -35,7 +35,6 @@
|
||||
|
||||
-include $(TOPDIR)/.config # Current configuration
|
||||
-include $(TOPDIR)/Make.defs # Basic make info
|
||||
include ../Make.defs # NXFLAT make info
|
||||
|
||||
BIN = task
|
||||
|
||||
@ -48,27 +47,33 @@ R2OBJ = $(R2SRC:.S=.o)
|
||||
all: $(BIN)
|
||||
|
||||
$(R1OBJS): %.o: %.c
|
||||
$(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
|
||||
@echo "CC: $<"
|
||||
@$(CC) -c $(CPICFLAGS) $< -o $@
|
||||
|
||||
$(R2OBJ): %.o: %.S
|
||||
$(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
|
||||
@echo "AS: $<"
|
||||
@$(CC) -c $(CPICFLAGS) $< -o $@
|
||||
|
||||
$(BIN).r1: $(R1OBJS)
|
||||
$(NXFLATLD) $(NXFLATLDFLAGS1) -o $@ $^
|
||||
@echo "LD: $<"
|
||||
@$(LD) $(NXFLATLDFLAGS1) -o $@ $^
|
||||
|
||||
$(R2SRC): $(BIN).r1
|
||||
$(MKNXFLAT) -o $@ $^
|
||||
@echo "MK: $<"
|
||||
@$(MKNXFLAT) -o $@ $^
|
||||
|
||||
$(BIN).r2: $(R2OBJ)
|
||||
$(NXFLATLD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
|
||||
@echo "LD: $<"
|
||||
@$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
|
||||
|
||||
$(BIN): $(BIN).r2
|
||||
$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
|
||||
@echo "LD: $<"
|
||||
@$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
|
||||
|
||||
clean:
|
||||
rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
|
||||
@rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
|
||||
|
||||
install:
|
||||
install -D $(BIN) $(ROMFS_DIR)/$(BIN)
|
||||
@install -D $(BIN) $(ROMFS_DIR)/$(BIN)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user