diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-04-21 22:43:24 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-04-21 22:43:24 +0000 |
commit | 1b2276da2110d08dfb38bf6f64000a293e1fe421 (patch) | |
tree | 2547fd491d04980a0407e42fa48de5d98d172c25 /include | |
parent | 993bea83732043d16f512b0423f3a0f3669c48f5 (diff) | |
download | ATCD-1b2276da2110d08dfb38bf6f64000a293e1fe421.tar.gz |
ChangeLogTag:Sat Apr 21 15:31:27 2001 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'include')
-rw-r--r-- | include/makeinclude/platform_cygwin32.GNU | 24 | ||||
-rw-r--r-- | include/makeinclude/platform_gnuwin32_common.GNU | 96 | ||||
-rw-r--r-- | include/makeinclude/platform_mingw32.GNU | 62 | ||||
-rw-r--r-- | include/makeinclude/rules.local.GNU | 2 | ||||
-rw-r--r-- | include/makeinclude/wrapper_macros.GNU | 6 |
5 files changed, 186 insertions, 4 deletions
diff --git a/include/makeinclude/platform_cygwin32.GNU b/include/makeinclude/platform_cygwin32.GNU new file mode 100644 index 00000000000..69837b81084 --- /dev/null +++ b/include/makeinclude/platform_cygwin32.GNU @@ -0,0 +1,24 @@ +# $Id$ + +# +# This file should allow to build ACE for cygwin32 with cygwin tools. +# +# Edit to change TCPU and w32api defs below. +# +# Don't forget to define the ACE_ROOT environment variable! +# + +# +# Chose your target CPU (uncomment ONE of these). +# +TCPU = pentiumpro +#TCPU = pentium +#TCPU = i486 +#TCPU = i386 + +cygwin32 = 1 +threads = 0 +static_libs_only = 1 +optimize = 0 + +include $(ACE_ROOT)/include/makeinclude/platform_gnuwin32_common.GNU diff --git a/include/makeinclude/platform_gnuwin32_common.GNU b/include/makeinclude/platform_gnuwin32_common.GNU new file mode 100644 index 00000000000..412420bf95a --- /dev/null +++ b/include/makeinclude/platform_gnuwin32_common.GNU @@ -0,0 +1,96 @@ +# $Id$ + +ifneq ($(mingw32),1) + ifneq ($(cygwin32),1) + fail := \ + $(shell \ + echo "You should not use this file but one of"; \ + echo "platform_mingw32.GNU or platform_cygwin32.GNU"; \ + exit 1) + endif +endif + +# debug = 1 +# optimize = 1 +# exceptions = 0 + +ifndef winsock2 + winsock2 = 1 +endif + +ifndef exceptions + exceptions = 0 +endif +ifeq (,$(debug)) + debug = 1 +endif +ifeq (,$(optimize)) + optimize = 1 +endif +ifeq (,$(threads)) + threads = 1 +endif +ifeq ($(threads),0) + CFLAGS += -DACE_MT_SAFE=0 +endif # threads + +ifeq ($(mingw32),1) +CFLAGS += \ + -I$(MINGW_BASE)/mingw32/include \ + -I$(MINGW_BASE)/w32api/include \ + -I$(MINGW_BASE)/include +LDFLAGS += \ + -L$(MINGW_BASE)/mingw32/lib \ + -L$(MINGW_BASE)/w32api/lib \ + -L$(MINGW_BASE)/lib +endif + +ifeq ($(debug),0) +CFLAGS += -DNDEBUG +endif + +CC = gcc -m$(TCPU) +CXX = g++ -m$(TCPU) + +# Never use -pipe with 95/98. On NT/2000, not sure if it helps. +CFLAGS += -W -Wall -Wpointer-arith +ifeq ($(threads),1) + CC += -mthreads + CXX += -mthreads +endif # threads + +ifeq ($(IMPLICIT_TEMPLATES_FLAG),) + IMPLICIT_TEMPLATES_FLAG=-fno-implicit-templates +endif + +CCFLAGS += $(CFLAGS) $(IMPLICIT_TEMPLATES_FLAG) +DCFLAGS += -g +DLD = $(CXX) +LD = $(CXX) + +ifeq ($(mingw32),1) +ifeq ($(winsock2),1) +LIBS += -lws2_32 -lmswsock +endif +LIBS += -lwsock32 +endif + +VSHDIR = .obj/ + +OCFLAGS += -O3 +PIC = +AR = ar +ARFLAGS = rsuv +RANLIB = ranlib +SOEXT = dll +SOFLAGS = $(CPPFLAGS) +SOBUILD = $(COMPILE.cc) $(PIC) -o $(VSHDIR)$*.so $< +# The sed below is a workaround to a bug in ld. +SHLIBBUILD = dlltool --export-all --output-def $@.def --dllname $@ $(VSHOBJS1) && mv $@.def $@.def.old && sed 's/;.*$$//g' < $@.def.old > $@.def && $(SOLINK.cc) -Wl,--enable-auto-image-base -Wl,--out-implib,$@.a -shared -o $@ $(LDFLAGS) $@.def $(VSHOBJS1) $(LIBS) && $(RM) $@.def.old $@.def + +ifeq ($(exceptions),1) +SHLIBBUILD += \ + ;echo "Warning: exceptions fail when mixing DLL and non DLL calls." +endif + +PRELIB = @true diff --git a/include/makeinclude/platform_mingw32.GNU b/include/makeinclude/platform_mingw32.GNU new file mode 100644 index 00000000000..ba2d31272df --- /dev/null +++ b/include/makeinclude/platform_mingw32.GNU @@ -0,0 +1,62 @@ +# $Id$ + +# +# This file should allow to build ACE for mingw32 with mingw tools. +# Edit to change TCPU and M32_BASE below. +# +# Don't forget to define the ACE_ROOT environment variable! +# + +# +# mingw32 packages as distributed from sourceforge: +# http://sourceforge.net/project/showfiles.php?group_id=2435&release_id=15084 +# See also http://www.mingw.org. +# +# You will also need a GNU Make for win32 (so you can actualy +# USE this file :-). Tested with make/sh from cygwin. +# +# Tested with: +# +# mingw-runtime-0.5-20010221 +# w32api-0.5-20010301 +# gcc-2.95.2-20001116 +# binutils-2.10.91-20010114 +# ld-2.10.91-20010126 +# libbfd-2.10.91-20010121 +# +# Caveat: +# +# If ld complains about not finding crt2.o, dllcrt2.o or gcrt2.o +# when linking executables, you will need to modify the specs file for gcc: +# lib/gcc-lib/mingw32/2.95.2/specs +# look for the line after the one begining ``*startfile:'', and add +# full path as prefix for crt2, dllcrt2 and gcrt2 +# (i.e., change +# ... %{!shared:%{!mdll:crt2%O%s}} ... +# with +# ... %{!shared:%{!mdll:c:/mingw32/lib/gcc-lib/mingw32/2.95.2/crt2%O%s}} ... +# or something similar depending on the location of your instalation). +# + +# +# Chose your target CPU (uncomment ONE of these). +# +TCPU = pentiumpro +#TCPU = pentium +#TCPU = i486 +#TCPU = i386 + +# +# Define here mingw32 instalation location. +# These asumes no fancy hierachy, just all packages above unpacked on +# the same base directory. +# Optionally, you can define it as an environment variable, or set it +# on your platform_macros.GNU before including this file. +# +ifndef MINGW_BASE + MINGW_BASE = c:/live/local/mingw32 +endif + +mingw32 = 1 + +include $(ACE_ROOT)/include/makeinclude/platform_gnuwin32_common.GNU diff --git a/include/makeinclude/rules.local.GNU b/include/makeinclude/rules.local.GNU index ed0854313b6..756f5cea871 100644 --- a/include/makeinclude/rules.local.GNU +++ b/include/makeinclude/rules.local.GNU @@ -221,7 +221,7 @@ clean.local: -$(RM) -r SunWS_cache ir.out realclean.local: clean.local - -$(RM) $(BIN) $(BIN:%=%_debug) $(BIN:%=%_profile) $(BIN:%=%_optimize) $(LIB:%=%) $(LIB:%=%_debug) $(LIB:%=%_profile) $(LIB:%=%_optimize) $(SHLIB:%=%) $(SHLIB:%=%_debug) $(SHLIB:%=%_profile) $(SHLIB:%=%_optimize) $(SHLIBA:%=%) $(BIN2) $(BIN2:%=%_debug) $(BIN2:%=%_profile) $(BIN2:%=%_optimize) $(LIB2:%=%) $(LIB2:%=%_debug) $(LIB2:%=%_profile) $(LIB2:%=%_optimize) $(SHLIB2:%=%) $(SHLIB2:%=%_debug) $(SHLIB2:%=%_profile) $(SHLIB2:%=%_optimize) $(SHLIBA2:%=%) + -$(RM) $(BIN) $(BIN:%=%_debug) $(BIN:%=%_profile) $(BIN:%=%_optimize) $(LIB:%=%) $(LIB:%=%_debug) $(LIB:%=%_profile) $(LIB:%=%_optimize) $(SHLIB:%=%) $(SHLIB:%=%.a) $(SHLIB:%=%_debug) $(SHLIB:%=%_profile) $(SHLIB:%=%_optimize) $(SHLIBA:%=%) $(BIN2) $(BIN2:%=%_debug) $(BIN2:%=%_profile) $(BIN2:%=%_optimize) $(LIB2:%=%) $(LIB2:%=%_debug) $(LIB2:%=%_profile) $(LIB2:%=%_optimize) $(SHLIB2:%=%) $(SHLIB2:%=%_debug) $(SHLIB2:%=%_profile) $(SHLIB2:%=%_optimize) $(SHLIBA2:%=%) #---------------------------------------------------------------------------- # Dependency generation target diff --git a/include/makeinclude/wrapper_macros.GNU b/include/makeinclude/wrapper_macros.GNU index 9d5e88d1548..bdbd1c912e8 100644 --- a/include/makeinclude/wrapper_macros.GNU +++ b/include/makeinclude/wrapper_macros.GNU @@ -279,13 +279,13 @@ endif ifeq ($(findstring g++,$(CXX)),g++) ifndef ACE_HAS_GNUG_PRE_2_8 - ifeq ($(notdir $(CXX)),g++) + ifeq ($(filter g++,$(notdir $(CXX))),g++) ACE_HAS_GNUG_PRE_2_8 := \ $(shell \ if $(CXX) --version | egrep '^(cygnus-)?2\.[0-7]' > /dev/null; then \ echo 1; else echo 0; fi) else # ! g++ - ifeq (eg++,$(notdir $(CXX)),eg++) + ifeq (eg++,$(filter g++,$(notdir $(CXX))),eg++) # Assume that eg++ is egcs. ACE_HAS_GNUG_PRE_2_8 := 0 else # ! plain g++ or eg++ @@ -568,7 +568,7 @@ ifdef shared_libs VDIR = .shobj/ ifeq ($(BIN),) #### No executables are being built, so don't create .obj/. - OBJDIRS = .shobj + OBJDIRS = $(VSHDIR) endif # BIN endif # ! VXWORKS endif # ! SHLIB |