diff options
Diffstat (limited to 'apps/examples/nettest')
-rw-r--r-- | apps/examples/nettest/Makefile | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/apps/examples/nettest/Makefile b/apps/examples/nettest/Makefile index b828d6691..99410d47a 100644 --- a/apps/examples/nettest/Makefile +++ b/apps/examples/nettest/Makefile @@ -42,18 +42,24 @@ include $(APPDIR)/Make.defs TARG_ASRCS = TARG_AOBJS = $(TARG_ASRCS:.S=$(OBJEXT)) -TARG_CSRCS = nettest.c +TARG_CSRCS = ifeq ($(CONFIG_EXAMPLES_NETTEST_SERVER),y) TARG_CSRCS += nettest_server.c else TARG_CSRCS += nettest_client.c endif +TARG_MAINSRC = nettest.c TARG_COBJS = $(TARG_CSRCS:.c=$(OBJEXT)) +TARG_MAINOBJ = $(TARG_MAINSRC:.c=$(OBJEXT)) -TARG_SRCS = $(TARG_ASRCS) $(TARG_CSRCS) +TARG_SRCS = $(TARG_ASRCS) $(TARG_CSRCS) $(TARG_CSRCS) TARG_OBJS = $(TARG_AOBJS) $(TARG_COBJS) +ifneq ($(CONFIG_BUILD_KERNEL),y) + TARG_OBJS += $(TARG_MAINOBJ) +endif + ifeq ($(CONFIG_WINDOWS_NATIVE),y) TARG_BIN = ..\..\libapps$(LIBEXT) else @@ -126,9 +132,10 @@ $(HOST_BIN): $(HOST_OBJS) @touch .built ifeq ($(CONFIG_BUILD_KERNEL),y) -$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) +$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) $(TARG_MAINOBJ) @echo "LD: $(PROGNAME)" - $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(LDLIBS) + $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(TARG_MAINOBJ) $(LDLIBS) + $(Q) $(NM) -u $(INSTALL_DIR)$(DELIM)$(PROGNAME) install: $(BIN_DIR)$(DELIM)$(PROGNAME) |