Add support for Solaris 2.6 on sun4m builds
It is an excellent platform for catching bugs: big-endian, slow enough that a context switch in the middle of an operation becomes a regular occurrence, and all that on a SMP box. Or: I just wanted to see if it would work. Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
parent
47920df65c
commit
fda285e2f5
52 changed files with 1266 additions and 4197 deletions
59
ports/solaris2.6/makefile
Normal file
59
ports/solaris2.6/makefile
Normal file
|
@ -0,0 +1,59 @@
|
|||
.PHONY: all clean
|
||||
|
||||
include $(dir $(lastword $(MAKEFILE_LIST)))/config.mk
|
||||
|
||||
CPPFLAGS += -Isrc/core/ddsc/src -Isrc/core/ddsc/include -Isrc/core/ddsi/include -Isrc/ddsrt/include
|
||||
CPPFLAGS += $(addprefix -I, $(wildcard src/ddsrt/src/*/include))
|
||||
CPPFLAGS += -Ibuild/core/include -Ibuild/ddsrt/include
|
||||
CPPFLAGS += -DDDSI_INCLUDE_NETWORK_PARTITIONS # -DDDSI_INCLUDE_BANDWIDTH_LIMITING -DDDSI_INCLUDE_NETWORK_CHANNELS
|
||||
|
||||
SHLIBS = ddsc
|
||||
EXES = ddsperf
|
||||
|
||||
all: $(SHLIBS:%=$(GEN)/$(LIBPRE)%$(SO)) $(EXES:%=$(GEN)/%$X)
|
||||
lib: $(SHLIBS:%=$(GEN)/$(LIBPRE)%$(SO))
|
||||
|
||||
clean:
|
||||
rm -rf $(GEN)/*
|
||||
|
||||
LIBCDDS_SRCDIRS := src/core/ddsi/src src/core/ddsc/src src/ddsrt/src $(DDSRT:%=src/ddsrt/src/*/%)
|
||||
LIBCDDS_SRC := $(filter-out %/getopt.c, $(wildcard $(LIBCDDS_SRCDIRS:%=%/*.c)))
|
||||
ifeq "$(words $(DDSRT))" "2" # max = 2 ...
|
||||
pct=%
|
||||
XX=$(filter src/ddsrt/src/%/$(word 1, $(DDSRT))/, $(dir $(LIBCDDS_SRC)))
|
||||
YY=$(patsubst %/$(word 1, $(DDSRT))/, %/$(word 2, $(DDSRT))/, $(XX))
|
||||
LIBCDDS_SRC := $(filter-out $(YY:%=%$(pct)), $(LIBCDDS_SRC))
|
||||
endif
|
||||
|
||||
$(GEN)/$(LIBPRE)ddsc$(SO): CPPFLAGS += -Dddsc_EXPORTS
|
||||
$(GEN)/$(LIBPRE)ddsc$(SO): CPPFLAGS += -fPIC
|
||||
|
||||
ifneq "$(COMPILE_MANY_ATONCE)" "true"
|
||||
$(GEN)/$(LIBPRE)ddsc$(SO): $(LIBCDDS_SRC:%.c=$(GEN)/%$O)
|
||||
$(make_shlib)
|
||||
else # /Fo bit is MSVC specific
|
||||
$(GEN)/$(LIBPRE)ddsc$(SO): $(LIBCDDS_SRC)
|
||||
xs="" ;\
|
||||
for x in $(foreach x, $^, $(call getabspath, $x)) ; do \
|
||||
[ $$x -nt $(GEN)/`basename $$x .c`$O ] && xs="$$xs $$x" ; \
|
||||
done ; \
|
||||
echo "compile: $$xs" ; \
|
||||
[ -z "$$xs" ] || $(CC) $(CPPFLAGS) -MP8 -Fo.\\$(GEN)\\ -c $$xs
|
||||
$(LD) $(LDFLAGS) $(SHLIB_OFLAG)$@ $(LIBCDDS_SC:%=$(GEN)/%$O) $(LDLIBS)
|
||||
endif
|
||||
|
||||
DDSPERF_SRCDIRS := src/tools/ddsperf build/tools/ddsperf
|
||||
DDSPERF_SRC := $(wildcard $(DDSPERF_SRCDIRS:%=%/*.c))
|
||||
|
||||
$(GEN)/ddsperf$X: LDLIBS += -L. -lddsc
|
||||
$(GEN)/ddsperf$X: CPPFLAGS += -Ibuild/tools/ddsperf
|
||||
$(GEN)/ddsperf$X: $(DDSPERF_SRC:%.c=%.o) | $(GEN)/$(LIBPRE)ddsc$(SO)
|
||||
$(make_exe)
|
||||
|
||||
$(GEN)/%.STAMP: ; @[ -d $(dir $@) ] || { mkdir -p $(dir $@) ; touch $@ ; }
|
||||
|
||||
$(GEN)/%$O: %.c $(GEN)/%.STAMP
|
||||
$(CC) $(CPPFLAGS) $(OBJ_OFLAG)$@ -c $<
|
||||
|
||||
$(GEN)/%.d: %.c
|
||||
$(make_dep)
|
Loading…
Add table
Add a link
Reference in a new issue