~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to examples/mex-examples/mex-with-objects/Makefile.mak

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
SHELL = /bin/sh
2
 
 
3
 
SCIDIR=../../..
4
 
SCIDIR1=..\..\..
5
 
 
6
 
!include $(SCIDIR)/Makefile.incl.mak 
7
 
 
8
 
FFLAGS = $(FC_OPTIONS) -DFORDLL -I$(SCIDIR1)\routines
9
 
CFLAGS = $(CC_OPTIONS) -DFORDLL -I$(SCIDIR)/routines
10
 
 
11
 
################# List of source mexfiles ######################
12
 
CMEXSOURCES = mexfunction1.c mexfunction2.c mexfunction3.c \
13
 
        mexfunction4.c mexfunction5.c mexfunction6.c \
14
 
        mexfunction7.c mexfunction8.c mexfunction9.c \
15
 
        mexfunction10.c mexfunction11.c  mexfunction12.c  \
16
 
        mexfunction13.c 
17
 
 
18
 
FORTRANMEXSOURCES = 
19
 
 
20
 
################# List of associated Scilab functions  ##########
21
 
#               (= by default the name of the mexfunction)      #
22
 
FCTS = $(CMEXSOURCES:.c=) $(FORTRANMEXSOURCES:.f=)
23
 
 
24
 
################## List of routines used by the mexfiles ########
25
 
OTHERCSOURCES = 
26
 
 
27
 
OTHERFORTRANSOURCES =
28
 
 
29
 
################## Name of startup file (default = "startup.sce") #
30
 
 
31
 
STARTUP = startup
32
 
################## Name of gateway file (default = "generic_gateway.c #
33
 
 
34
 
GENERIC = generic
35
 
########## Do not edit below this line #############
36
 
 
37
 
MEXOBJS = $(CMEXSOURCES:.c=.obj) $(FORTRANMEXSOURCES:.f=.obj)
38
 
 
39
 
OTHEROBJS = $(OTHERCSOURCES:.c=.obj) $(OTHERFORTRANSOURCES:.f=.obj)
40
 
 
41
 
OTHERSOURCES = $(OTHERCSOURCES) $(OTHERFORTRANSOURCES)
42
 
 
43
 
MEXSOURCES = $(CMEXSOURCES) $(FORTRANMEXSOURCES)
44
 
 
45
 
OBJS = $(MEXOBJS) $(OTHEROBJS) $(GENERIC)_gateway.obj 
46
 
 
47
 
DUMPEXTS=$(SCIDIR1)\bin\dumpexts
48
 
SCIIMPLIB=$(SCIDIR)/bin/LibScilab.lib
49
 
 
50
 
all     ::  rmold $(GENERIC)_gateway.c $(OBJS)  $(GENERIC).dll startup.sce message
51
 
 
52
 
clean::
53
 
        @del *.obj
54
 
        @del *.dll
55
 
        @del *.def
56
 
        @del *.ilib
57
 
        @del *.exp
58
 
        @del startup.sce
59
 
        @del $(GENERIC)_gateway.c
60
 
 
61
 
distclean:: clean
62
 
 
63
 
$(GENERIC)_gateway.c $(STARTUP).sce:
64
 
        @echo "-- Generating the C function $(GENERIC)_gateway.c";
65
 
        @echo "-- ... and the Scilab script $(STARTUP).sce";
66
 
        @$(SCIDIR1)\macros\Gengatsce @<< @<< @<< @<<
67
 
$(FCTS)
68
 
<<
69
 
$(OTHEROBJS)
70
 
<<
71
 
$(MEXSOURCES)
72
 
<<
73
 
$(STARTUP) $(GENERIC)
74
 
<<
75
 
 
76
 
message:
77
 
        @echo "------------------------------------------";
78
 
        @echo "To load $(FCTS)";
79
 
        @echo "        functions, at Scilab prompt, enter:";
80
 
        @echo "-->exec $(STARTUP).sce";
81
 
        @echo "------------------------------------------";
82
 
 
83
 
 
84
 
 
85
 
$(GENERIC).dll: $(OBJS)
86
 
        @echo Creation of dll $*.dll and import lib 
87
 
        @$(DUMPEXTS) -o "$*.def" "$*.dll" $**
88
 
        @$(LINKER) $(LINKER_FLAGS) $(OBJS) $(SCIIMPLIB) $(XLIBSBIN) $(TERMCAPLIB) /nologo /dll /out:"$*.dll" /implib:"$*.ilib" /def:"$*.def" 
89
 
 
90
 
rmold:
91
 
        @del $(GENERIC)_gateway.c $(STARTUP).sce
92
 
 
93
 
################# test ######################
94
 
 
95
 
tests   :
96
 
        @del mexobjs.dia        
97
 
        $(SCIDIR1)\bin\scilex.exe  -f mexobjs.tst 
98