[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MSVC compiler support [patch 10]: .oct file compilation
From: |
Michael Goffioul |
Subject: |
MSVC compiler support [patch 10]: .oct file compilation |
Date: |
Tue, 17 Oct 2006 21:46:18 +0200 |
User-agent: |
Thunderbird 1.5.0.7 (Windows/20060909) |
Oct files needs a different set of compilation flag, to switch from
dllexport to dllimport.
To achieve this, I compile oct-objects in a different oct/ subdirectory.
Index: Makeconf.in
===================================================================
RCS file: /cvs/octave/Makeconf.in,v
retrieving revision 1.180
diff -p -c -r1.180 Makeconf.in
*** Makeconf.in 13 Oct 2006 18:11:26 -0000 1.180
--- Makeconf.in 17 Oct 2006 11:07:41 -0000
*************** pic/%.o : %.c
*** 381,386 ****
--- 381,392 ----
pic/%.o : %.cc
$(CXX) -c $(CPPFLAGS) $(CXXPICFLAG) $(ALL_CXXFLAGS) $< -o $@
+ oct/%.o : %.c
+ $(CC) -c $(CPPFLAGS) $(CPICFLAG) $(filter-out $(XTRA_CDEFS),
$(ALL_CFLAGS)) $< -o $@
+
+ oct/%.o : %.cc
+ $(CXX) -c $(CPPFLAGS) $(CXXPICFLAG) $(filter-out $(XTRA_CXXDEFS),
$(ALL_CXXFLAGS)) $< -o $@
+
# Here is a rule for generating dependencies for .cc files:
%.d : %.cc
Index: src/Makefile.in
===================================================================
RCS file: /cvs/octave/src/Makefile.in,v
retrieving revision 1.417
diff -p -c -r1.417 Makefile.in
*** src/Makefile.in 13 Oct 2006 18:11:27 -0000 1.417
--- src/Makefile.in 17 Oct 2006 11:07:42 -0000
*************** ifeq ($(ENABLE_DYNAMIC_LINKING), true)
*** 35,42 ****
%.oct : pic/%.o octave$(EXEEXT)
$(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS)
else
! %.oct : %.o octave$(EXEEXT)
! $(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS)
endif
endif
--- 38,50 ----
%.oct : pic/%.o octave$(EXEEXT)
$(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS)
else
! ifdef XTRA_CXXDEFS
! %.oct : oct/%.o octave$(EXEEXT)
! $(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS)
! else
! %.oct : %.o octave$(EXEEXT)
! $(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS)
! endif
endif
endif
*************** ifeq ($(ENABLE_DYNAMIC_LINKING), true)
*** 65,71 ****
ifdef CXXPICFLAG
DLD_PICOBJ := $(addprefix pic/, $(DLD_OBJ))
else
! DLD_PICOBJ := $(DLD_OBJ)
endif
else
DLD_STATIC_OBJ := $(DLD_OBJ)
--- 73,83 ----
ifdef CXXPICFLAG
DLD_PICOBJ := $(addprefix pic/, $(DLD_OBJ))
else
! ifdef XTRA_CXXDEFS
! DLD_PICOBJ := $(addprefix oct/, $(DLD_OBJ))
! else
! DLD_PICOBJ := $(DLD_OBJ)
! endif
endif
else
DLD_STATIC_OBJ := $(DLD_OBJ)
*************** DISTFILES = Makefile.in ChangeLog mkdefs
*** 256,262 ****
oct-gperf.h parse.cc lex.cc y.tab.h __gnuplot_raw__.cc \
$(INCLUDES) $(DIST_SRC) $(OPT_HANDLERS) $(EXTRAS)
! all: octave$(EXEEXT) $(OCT_FILES) PKG_ADD DOCSTRINGS
.PHONY: all
objects: $(OBJECTS)
--- 268,274 ----
oct-gperf.h parse.cc lex.cc y.tab.h __gnuplot_raw__.cc \
$(INCLUDES) $(DIST_SRC) $(OPT_HANDLERS) $(EXTRAS)
! all: octave$(EXEEXT) stmp-oct $(OCT_FILES) PKG_ADD DOCSTRINGS
.PHONY: all
objects: $(OBJECTS)
*************** pic:
*** 333,338 ****
--- 345,368 ----
$(PICOBJ): stmp-pic
+ stmp-oct: oct
+ @if [ -f stmp-oct ]; then \
+ true; \
+ else \
+ echo "touch stmp-oct"; \
+ touch stmp-oct; \
+ fi
+
+ oct:
+ @if [ -d oct ]; then \
+ true; \
+ else \
+ echo "mkdir oct"; \
+ mkdir oct; \
+ fi
+
+ $(DLD_PICOBJ): stmp-oct
+
builtins.cc: $(DEF_FILES) mkbuiltins
@echo making $@
@echo DEF_FILES = $(DEF_FILES)
*************** clean:
*** 467,476 ****
rm -f $(LIBPRE)octinterp.$(LIBEXT)
rm -f $(LIBPRE)octinterp.$(SHLEXT_VER) $(LIBPRE)octinterp.$(SHLEXT)
rm -f $(OBJECTS) $(DLD_OBJ) $(MAKEDEPS) $(DOC_FILES) $(OCT_FILES)
! rm -f $(PICOBJ) $(DLD_PICOBJ) stmp-pic gendoc$(EXEEXT)
rm -f builtins.cc ops.cc defaults.h oct-conf.h def-files
rm -f PKG_ADD
-rmdir pic
.PHONY: clean
mostlyclean: clean
--- 497,507 ----
rm -f $(LIBPRE)octinterp.$(LIBEXT)
rm -f $(LIBPRE)octinterp.$(SHLEXT_VER) $(LIBPRE)octinterp.$(SHLEXT)
rm -f $(OBJECTS) $(DLD_OBJ) $(MAKEDEPS) $(DOC_FILES) $(OCT_FILES)
! rm -f $(PICOBJ) $(DLD_PICOBJ) stmp-pic stmp-oct gendoc$(EXEEXT)
rm -f builtins.cc ops.cc defaults.h oct-conf.h def-files
rm -f PKG_ADD
-rmdir pic
+ -rmdir oct
.PHONY: clean
mostlyclean: clean
*************** ifeq ($(ENABLE_DYNAMIC_LINKING), true)
*** 578,589 ****
__glpk__.oct : pic/__glpk__.o octave$(EXEEXT)
$(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS) $(GLPK_LIBS)
else
! regexp.oct : regexp.o octave$(EXEEXT)
! $(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS) $(REGEX_LIBS)
! urlwrite.oct : urlwrite.o octave$(EXEEXT)
! $(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS) $(CURL_LIBS)
! __glpk__.oct : __glpk__.o octave$(EXEEXT)
! $(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS) $(GLPK_LIBS)
endif
endif
--- 609,629 ----
__glpk__.oct : pic/__glpk__.o octave$(EXEEXT)
$(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS) $(GLPK_LIBS)
else
! ifdef XTRA_CXXDEFS
! regexp.oct : oct/regexp.o octave$(EXEEXT)
! $(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS) $(REGEX_LIBS)
! urlwrite.oct : oct/urlwrite.o octave$(EXEEXT)
! $(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS) $(CURL_LIBS)
! __glpk__.oct : oct/__glpk__.o octave$(EXEEXT)
! $(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS) $(GLPK_LIBS)
! else
! regexp.oct : regexp.o octave$(EXEEXT)
! $(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS) $(REGEX_LIBS)
! urlwrite.oct : urlwrite.o octave$(EXEEXT)
! $(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS) $(CURL_LIBS)
! __glpk__.oct : __glpk__.o octave$(EXEEXT)
! $(DL_LD) $(DL_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS) $(GLPK_LIBS)
! endif
endif
endif
- Re: MSVC compiler support [patch 6]: Default program definition, (continued)
- Re: MSVC compiler support [patch 6]: Default program definition, John W. Eaton, 2006/10/26
- MSVC compiler support [patch 7]: mkdir number of arguments, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 7]: mkdir number of arguments, John W. Eaton, 2006/10/17
- Re: MSVC compiler support [patch 7]: mkdir number of arguments, Michael Goffioul, 2006/10/18
- Re: MSVC compiler support [patch 7]: mkdir number of arguments, John W. Eaton, 2006/10/26
- MSVC compiler support [patch 8]: isnan, finite and copysign, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 8]: isnan, finite and copysign, John W. Eaton, 2006/10/17
- Re: MSVC compiler support [patch 8]: isnan, finite and copysign, Michael Goffioul, 2006/10/18
- MSVC compiler support [patch 9]: Default object suffix, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 9]: Default object suffix, John W. Eaton, 2006/10/17
- MSVC compiler support [patch 10]: .oct file compilation,
Michael Goffioul <=
- MSVC compiler support [patch 10]: .oct file compilation, John W. Eaton, 2006/10/17
- Re: MSVC compiler support [patch 10]: .oct file compilation, Michael Goffioul, 2006/10/18
- Re: MSVC compiler support [patch 10]: .oct file compilation, John W. Eaton, 2006/10/24
- MSVC compiler support [patch 11]: CRUFT.DLL exported symbols (Fortran), Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 11]: CRUFT.DLL exported symbols (Fortran), John W. Eaton, 2006/10/25
- Re: MSVC compiler support [patch 11]: CRUFT.DLL exported symbols (Fortran), Michael Goffioul, 2006/10/25
- MSVC compiler support [patch 12]: Fortran code fix, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 12]: Fortran code fix, John W. Eaton, 2006/10/17
- Re: MSVC compiler support [patch 12]: Fortran code fix, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 13]: glob.h and fnmatch.h, Michael Goffioul, 2006/10/17