Mercurial > hg > octave-lyh
changeset 4113:f4bf4833e6c7
[project @ 2002-10-17 19:58:42 by jwe]
author | jwe |
---|---|
date | Thu, 17 Oct 2002 19:58:43 +0000 |
parents | c4ede5f4a03c |
children | a32457362437 |
files | src/ChangeLog src/Makefile.in src/main.c src/octave.cc src/octave.h |
diffstat | 5 files changed, 97 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,15 @@ 2002-10-17 John W. Eaton <jwe@bevo.che.wisc.edu> + * main.c: New file. + * octave.h: New file. + * octave.cc (octave_main): Rename from main. + Include octave.h. + * Makefile.in (OBJECTS): Add octave.o, builtins.o, and ops.o to + the list. + (octave): Depend on and link main.o, not octave.o, builtins.o, and + ops.o (they are now in liboctinterp). + (DEP_5): Add main.c here. + * oct-conf.h.in: No need to substitute OCTAVE_CONF_OCTAVE_LITE. * toplev.cc (octave_config_info): Likewise, don't include it in struct.
--- a/src/Makefile.in +++ b/src/Makefile.in @@ -148,7 +148,7 @@ OBJECTS_3 := $(patsubst %.l, %.o, $(OBJECTS_4)) OBJECTS_2 := $(patsubst %.y, %.o, $(OBJECTS_3)) OBJECTS_1 := $(patsubst %.c, %.o, $(OBJECTS_2)) -OBJECTS := $(patsubst %.cc, %.o, $(OBJECTS_1)) +OBJECTS := $(patsubst %.cc, %.o, $(OBJECTS_1)) octave.o builtins.o ops.o ifeq ($(SHARED_LIBS), true) ifdef CXXPICFLAG @@ -160,7 +160,7 @@ # Ugh. -DEP_5 := $(SOURCES) $(DLD_SRC) builtins.cc ops.cc octave.cc +DEP_5 := $(SOURCES) $(DLD_SRC) builtins.cc ops.cc octave.cc main.c DEP_4 := $(notdir $(DEP_5)) DEP_3 := $(patsubst %.l, %.cc, $(DEP_4)) DEP_2 := $(patsubst %.y, %.cc, $(DEP_3)) @@ -274,10 +274,10 @@ touch stamp-prereq octave$(EXEEXT): stamp-prereq $(LIBRARIES) stamp-oct-links \ - octave.o builtins.o ops.o $(DLD_STATIC_OBJ) + main.o $(DLD_STATIC_OBJ) $(LD_CXX) $(CPPFLAGS) $(ALL_CXXFLAGS) $(RDYNAMIC_FLAG) \ $(ALL_LDFLAGS) -o $@ \ - octave.o builtins.o ops.o $(XERBLA) $(DLD_STATIC_OBJ) \ + main.o $(XERBLA) $(DLD_STATIC_OBJ) \ $(OCTAVE_LFLAGS) \ $(OCTAVE_LIBS) \ $(LEXLIB) $(BLAS_LIBS) $(FFTW_LIBS) $(LIBS) $(FLIBS)
new file mode 100644 --- /dev/null +++ b/src/main.c @@ -0,0 +1,39 @@ +/* + +Copyright (C) 2002 John W. Eaton + +This file is part of Octave. + +Octave is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2, or (at your option) any +later version. + +Octave is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with Octave; see the file COPYING. If not, write to the Free +Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include "octave.h" + +int +main (int argc, char **argv) +{ + return octave_main (argc, argv); +} + +/* +;;; Local Variables: *** +;;; mode: C++ *** +;;; End: *** +*/
--- a/src/octave.cc +++ b/src/octave.cc @@ -57,6 +57,7 @@ #include "file-io.h" #include "input.h" #include "lex.h" +#include "octave.h" #include "oct-hist.h" #include "oct-obj.h" #include "ops.h" @@ -362,7 +363,7 @@ // You guessed it. int -main (int argc, char **argv) +octave_main (int argc, char **argv) { octave_env::set_program_name (argv[0]);
new file mode 100644 --- /dev/null +++ b/src/octave.h @@ -0,0 +1,42 @@ +/* + +Copyright (C) 2002 John W. Eaton + +This file is part of Octave. + +Octave is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2, or (at your option) any +later version. + +Octave is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with Octave; see the file COPYING. If not, write to the Free +Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ + +#if !defined (octave_octave_h) +#define octave_octave_h 1 + +#ifdef __cplusplus +extern "C" { +#endif + +extern int octave_main (int argc, char **argv); + +#ifdef __cplusplus +} +#endif + +#endif + +/* +;;; Local Variables: *** +;;; mode: C++ *** +;;; End: *** +*/