Changes to many Makefiles. For kernel buil object containing main cannot go into library because of name collisions. The object file must be handled as a special case in every Makefile

This commit is contained in:
Gregory Nutt 2014-09-07 08:51:51 -06:00
parent bbded7e15f
commit ab5cf06c48

View File

@ -39,31 +39,32 @@ include $(APPDIR)/Make.defs
# THTTPD Library # THTTPD Library
ASRCS = ASRCS =
CSRCS = CSRCS =
ifeq ($(CONFIG_NET_TCP),y) ifeq ($(CONFIG_NET_TCP),y)
CSRCS += thttpd.c libhttpd.c thttpd_cgi.c thttpd_alloc.c thttpd_strings.c timers.c fdwatch.c tdate_parse.c CSRCS += libhttpd.c thttpd_cgi.c thttpd_alloc.c thttpd_strings.c timers.c fdwatch.c tdate_parse.c
MAINSRC += thttpd.c
endif endif
AOBJS = $(ASRCS:.S=$(OBJEXT)) AOBJS = $(ASRCS:.S=$(OBJEXT))
COBJS = $(CSRCS:.c=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT))
MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT))
SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) SRCS = $(ASRCS) $(CSRCS) $(MAINSRC)
OBJS = $(AOBJS) $(COBJS) OBJS = $(AOBJS) $(COBJS)
ifneq ($(CONFIG_BUILD_KERNEL),y) ifneq ($(CONFIG_BUILD_KERNEL),y)
OBJS += $(MAINOBJ) OBJS += $(MAINOBJ)
endif endif
ifeq ($(CONFIG_WINDOWS_NATIVE),y) ifeq ($(CONFIG_WINDOWS_NATIVE),y)
BIN = ..\..\libapps$(LIBEXT) BIN = ..\..\libapps$(LIBEXT)
else else
ifeq ($(WINTOOL),y) ifeq ($(WINTOOL),y)
BIN = ..\\..\\libapps$(LIBEXT) BIN = ..\\..\\libapps$(LIBEXT)
else else
BIN = ../../libapps$(LIBEXT) BIN = ../../libapps$(LIBEXT)
endif endif
endif endif
@ -76,19 +77,19 @@ endif
CONFIG_XYZ_PROGNAME ?= thttpd$(EXEEXT) CONFIG_XYZ_PROGNAME ?= thttpd$(EXEEXT)
PROGNAME = $(CONFIG_XYZ_PROGNAME) PROGNAME = $(CONFIG_XYZ_PROGNAME)
ROOTDEPPATH = --dep-path . ROOTDEPPATH = --dep-path .
# CGI binaries (examples only, not used in the build) # CGI binaries (examples only, not used in the build)
CGIBINDIR = $(APPDIR)/netutils/thttpd/cgi-bin CGIBINDIR = $(APPDIR)/netutils/thttpd/cgi-bin
SUBDIRS = SUBDIRS =
ifeq ($(CONFIG_NXFLAT),y) ifeq ($(CONFIG_NXFLAT),y)
SUBDIRS = cgi-src SUBDIRS = cgi-src
SUBDIR_BIN1 = phf SUBDIR_BIN1 = phf
SUBDIR_BIN2 = redirect SUBDIR_BIN2 = redirect
SUBDIR_BIN3 = ssi SUBDIR_BIN3 = ssi
SUBDIR_BIN += cgi-bin/$(SUBDIR_BIN1) cgi-bin/$(SUBDIR_BIN2) cgi-bin/$(SUBDIR_BIN3) SUBDIR_BIN += cgi-bin/$(SUBDIR_BIN1) cgi-bin/$(SUBDIR_BIN2) cgi-bin/$(SUBDIR_BIN3)
endif endif
all: $(SUBDIR_BIN) .built all: $(SUBDIR_BIN) .built