summaryrefslogtreecommitdiff
path: root/nuttx/binfmt/Makefile
diff options
context:
space:
mode:
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