summaryrefslogtreecommitdiff
path: root/nuttx/binfmt/Makefile
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-10-24 16:46:12 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-10-24 16:46:12 +0000
commit31d66d5fb2961c4c2df0d9f415f91ee5405f8d19 (patch)
tree199c1ac47d5ce30532f7b23121bc7df2c580a8c6 /nuttx/binfmt/Makefile
parente2cd590a6f7e1a4132d2eda16e1f29c760b804bb (diff)
downloadnuttx-31d66d5fb2961c4c2df0d9f415f91ee5405f8d19.tar.gz
nuttx-31d66d5fb2961c4c2df0d9f415f91ee5405f8d19.tar.bz2
nuttx-31d66d5fb2961c4c2df0d9f415f91ee5405f8d19.zip
Add framework to support loadable ELF modules (not much logic in place yet)
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5250 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/binfmt/Makefile')
-rw-r--r--nuttx/binfmt/Makefile55
1 files changed, 27 insertions, 28 deletions
diff --git a/nuttx/binfmt/Makefile b/nuttx/binfmt/Makefile
index b3a9269b3..1b98e3ede 100644
--- a/nuttx/binfmt/Makefile
+++ b/nuttx/binfmt/Makefile
@@ -1,7 +1,7 @@
############################################################################
# nxflat/Makefile
#
-# Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
+# Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@@ -36,55 +36,54 @@
-include $(TOPDIR)/Make.defs
ifeq ($(WINTOOL),y)
-INCDIROPT = -w
+INCDIROPT = -w
endif
-CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/sched}
+CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/sched}
-ifeq ($(CONFIG_NXFLAT),y)
-include libnxflat/Make.defs
-LIBNXFLAT_CSRCS += nxflat.c
-endif
+# Basic BINFMT source files
BINFMT_ASRCS =
BINFMT_CSRCS = binfmt_globals.c binfmt_register.c binfmt_unregister.c \
- binfmt_loadmodule.c binfmt_unloadmodule.c binfmt_execmodule.c \
- binfmt_exec.c binfmt_dumpmodule.c
+ binfmt_loadmodule.c binfmt_unloadmodule.c binfmt_execmodule.c \
+ binfmt_exec.c binfmt_dumpmodule.c
-SYMTAB_ASRCS =
-SYMTAB_CSRCS = symtab_findbyname.c symtab_findbyvalue.c \
- symtab_findorderedbyname.c symtab_findorderedbyvalue.c
+# Symbol table source files
-SUBDIRS = libnxflat
+BINFMT_CSRCS += symtab_findbyname.c symtab_findbyvalue.c \
+ symtab_findorderedbyname.c symtab_findorderedbyvalue.c
-ASRCS = $(BINFMT_ASRCS) $(SYMTAB_ASRCS) $(LIBNXFLAT_ASRCS)
-AOBJS = $(ASRCS:.S=$(OBJEXT))
+# Add configured binary modules
-CSRCS = $(BINFMT_CSRCS) $(SYMTAB_CSRCS) $(LIBNXFLAT_CSRCS)
-COBJS = $(CSRCS:.c=$(OBJEXT))
+VPATH =
+SUBDIRS =
+
+include libnxflat/Make.defs
+include libelf/Make.defs
-SRCS = $(ASRCS) $(CSRCS)
-OBJS = $(AOBJS) $(COBJS)
+BINFMT_AOBJS = $(BINFMT_ASRCS:.S=$(OBJEXT))
+BINFMT_COBJS = $(BINFMT_CSRCS:.c=$(OBJEXT))
-BIN = libbinfmt$(LIBEXT)
+BINFMT_SRCS = $(BINFMT_ASRCS) $(BINFMT_CSRCS)
+BINFMT_OBJS = $(BINFMT_AOBJS) $(BINFMT_COBJS)
-VPATH = libnxflat
+BIN = libbinfmt$(LIBEXT)
-all: $(BIN)
+all: $(BIN)
-$(AOBJS): %$(OBJEXT): %.S
+$(BINFMT_AOBJS): %$(OBJEXT): %.S
$(call ASSEMBLE, $<, $@)
-$(COBJS): %$(OBJEXT): %.c
+$(BINFMT_COBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@)
-$(BIN): $(OBJS)
- @( for obj in $(OBJS) ; do \
+$(BIN): $(BINFMT_OBJS)
+ @( for obj in $(BINFMT_OBJS) ; do \
$(call ARCHIVE, $@, $${obj}); \
done ; )
-.depend: Makefile $(SRCS)
+.depend: Makefile $(BINFMT_SRCS)
@$(MKDEP) --dep-path . --dep-path libnxflat \
- $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
+ $(CC) -- $(CFLAGS) -- $(BINFMT_SRCS) >Make.dep
@touch $@
depend: .depend