cygwin mingwin
Jean-philippe Chancelier [Mon, 9 Jan 2006 15:11:03 +0000 (15:11 +0000)]
scilab/config/Makefile.gcwin32
scilab/config/Makefile.mingwin32 [new file with mode: 0644]

index 9ac5c5c..03919cc 100644 (file)
@@ -1,64 +1,22 @@
-# Copyright ENPC 
+# Copyright INRIA
 
 FFLAGS = $(FC_OPTIONS)
-CFLAGS = $(CC_OPTIONS)
 
-RESOURCES= routines/wsci/Rscilab.o
-DLL_NAME =LibScilab
-DLL_NAME1 =bin/LibScilab
-
-# scilex-lib
-
-bin/scilex bin/scilex.exe : scilex-lib  routines/wsci/Rscilab.o $(DLL_NAME1).a
-       @$(ECHO) ------- Building $@ --------
-       @$(CC)  -mconsole -o bin/scilex.exe libs/scimain.o \
-               $(RESOURCES) $(DLL_NAME1).a $(WINLIBS)  --enable-stdcall-fixup
-
-# with gcc -mno-cygwin et  f2c 
-
-$(DLL_NAME1).dll : $(DLL_NAME1).def  
-       @x=1;if test -f $(DLL_NAME1).dll; then  \
+bin/scilex: scilex-lib 
+       @x=1;if test -f $@; then  \
                x=`find $(MAINSCI) $(DEFAULTS) $(LIBR)  \( -name '*.a' -o -name '*.o' \) \
-               -newer $(DLL_NAME1).dll  -print | wc -l `; \
+               -newer $@ -print | wc -l `; \
        fi;\
        if test $$x -ne 0; then \
                $(RM) $@; \
-               $(ECHO) ------- Building $@ --------; \
-               $(LD) --shared -s -o $(DLL_NAME1).dll $(DLL_NAME1).def \
-                       $(MAINSCI) $(DEFAULTS) $(RESOURCES) \
-                       $(LIBR) -lg2c $(WINLIBS)  ; \
+               echo "linking"; \
+               $(FC) $(FFLAGS) -o $@ $(MAINSCI) $(DEFAULTS) $(FC_LDFLAGS) $(LIBR)\
+                       $(TCLTK_LIBS) $(XLIBS) $(TERMCAPLIB); \
        else \
-               echo $(DLL_NAME1) is up to date ; \
+               echo bin/scilex is up to date ; \
        fi
 
-ECHO=echo
-NM=nm 
-SED=sed
-
-$(DLL_NAME1).def : $(MAINSCI) $(DEFAULTS) $(RESOURCES) $(LIBR) 
-       @$(ECHO) ------- Building $@ --------
-       @$(ECHO) LIBRARY $(DLL_NAME) > $*.def
-       @$(ECHO) EXPORTS >> $*.def
-       @cat libs/libg2c.def  >> $*.def
-       @$(NM) $^ > Defs
-       @$(SED) -n '/^........ [BCDRT] _/s/^........ [BCDRT] _/ /p' Defs >> $*.def
-       @$(RM) Defs
-
-$(DLL_NAME1).a : $(DLL_NAME1).dll $(DLL_NAME1).def 
-       @$(ECHO) ------- Building $@ --------
-       @dlltool -k --as as --dllname $(DLL_NAME).dll \
-               --def $(DLL_NAME1).def --output-lib $(DLL_NAME1).a ;
-
-# XXXXX attention on veut un --whole-archive pour lg2c 
-
-scilex-force : 
-       $(CC)  -mconsole -o bin/scilex.exe libs/scimain.o \
-       $(RESOURCES) $(DLL_NAME1).a $(WINLIBS)  --enable-stdcall-fixup
-
-bin/sci.exe : 
-       $(CC) -mconsole -o bin/sci.exe  \
-               $(MAINSCI) $(DEFAULTS) $(RESOURCES) $(LIBR) -lg2c $(WINLIBS) 
-
-
-
 
+show   :
+       @echo $(FC) $(FFLAGS) -o $@ $(MAINSCI) $(DEFAULTS) $(FC_LDFLAGS) $(LIBR)\
+               $(TCLTK_LIBS) $(XLIBS) $(TERMCAPLIB);
diff --git a/scilab/config/Makefile.mingwin32 b/scilab/config/Makefile.mingwin32
new file mode 100644 (file)
index 0000000..9ac5c5c
--- /dev/null
@@ -0,0 +1,64 @@
+# Copyright ENPC 
+
+FFLAGS = $(FC_OPTIONS)
+CFLAGS = $(CC_OPTIONS)
+
+RESOURCES= routines/wsci/Rscilab.o
+DLL_NAME =LibScilab
+DLL_NAME1 =bin/LibScilab
+
+# scilex-lib
+
+bin/scilex bin/scilex.exe : scilex-lib  routines/wsci/Rscilab.o $(DLL_NAME1).a
+       @$(ECHO) ------- Building $@ --------
+       @$(CC)  -mconsole -o bin/scilex.exe libs/scimain.o \
+               $(RESOURCES) $(DLL_NAME1).a $(WINLIBS)  --enable-stdcall-fixup
+
+# with gcc -mno-cygwin et  f2c 
+
+$(DLL_NAME1).dll : $(DLL_NAME1).def  
+       @x=1;if test -f $(DLL_NAME1).dll; then  \
+               x=`find $(MAINSCI) $(DEFAULTS) $(LIBR)  \( -name '*.a' -o -name '*.o' \) \
+               -newer $(DLL_NAME1).dll  -print | wc -l `; \
+       fi;\
+       if test $$x -ne 0; then \
+               $(RM) $@; \
+               $(ECHO) ------- Building $@ --------; \
+               $(LD) --shared -s -o $(DLL_NAME1).dll $(DLL_NAME1).def \
+                       $(MAINSCI) $(DEFAULTS) $(RESOURCES) \
+                       $(LIBR) -lg2c $(WINLIBS)  ; \
+       else \
+               echo $(DLL_NAME1) is up to date ; \
+       fi
+
+ECHO=echo
+NM=nm 
+SED=sed
+
+$(DLL_NAME1).def : $(MAINSCI) $(DEFAULTS) $(RESOURCES) $(LIBR) 
+       @$(ECHO) ------- Building $@ --------
+       @$(ECHO) LIBRARY $(DLL_NAME) > $*.def
+       @$(ECHO) EXPORTS >> $*.def
+       @cat libs/libg2c.def  >> $*.def
+       @$(NM) $^ > Defs
+       @$(SED) -n '/^........ [BCDRT] _/s/^........ [BCDRT] _/ /p' Defs >> $*.def
+       @$(RM) Defs
+
+$(DLL_NAME1).a : $(DLL_NAME1).dll $(DLL_NAME1).def 
+       @$(ECHO) ------- Building $@ --------
+       @dlltool -k --as as --dllname $(DLL_NAME).dll \
+               --def $(DLL_NAME1).def --output-lib $(DLL_NAME1).a ;
+
+# XXXXX attention on veut un --whole-archive pour lg2c 
+
+scilex-force : 
+       $(CC)  -mconsole -o bin/scilex.exe libs/scimain.o \
+       $(RESOURCES) $(DLL_NAME1).a $(WINLIBS)  --enable-stdcall-fixup
+
+bin/sci.exe : 
+       $(CC) -mconsole -o bin/sci.exe  \
+               $(MAINSCI) $(DEFAULTS) $(RESOURCES) $(LIBR) -lg2c $(WINLIBS) 
+
+
+
+