-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile-553.solaris8
86 lines (63 loc) · 2.33 KB
/
Makefile-553.solaris8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#----------------------------------------------------------------------
# eMatrix Makefile
# Uses SWIG to build an Matrix One MQLIO Module for Perl
#----------------------------------------------------------------------
SRCS = mql.c mql_wrap.c
IFILE = mql
INTERFACE = $(IFILE).h
WRAPFILE = $(IFILE)_wrap.c
MATRIXHOME = /app/matrixone/ematrix
PLATFORM = solaris4
SWIG = /usr/local/swig/bin/swig
SWIGOPTS = -perl5
SRCDIR = $(PWD)
TARGET = MQL.so
OBJS = mql.o mql_wrap.o
#----------------------------------------------------------------------
# Compiler and Platform Specific Stuff
#----------------------------------------------------------------------
CC = gcc
CC_PICFLAG = -shared
LD_PICFLAG = -G
CFLAGS =
OFLAG = -O
#----------------------------------------------------------------------
# Perl Settings
#----------------------------------------------------------------------
PERL_DIR = /usr/perl5
PERL_INCLUDE = -I$(PERL_DIR)/5.00503/sun4-solaris/CORE
PERL_LIB = $(PERL_DIR)/5.00503/sun4-solaris/CORE/libperl.so
PERL_FLAGS =
PERL_SITE = $(PERL_DIR)/site_perl/5.005
PERL_AUTO = $(PERL_SITE)/sun4-solaris/auto/MQL
#----------------------------------------------------------------------
# Compile
#----------------------------------------------------------------------
MATRIX_INCLUDE = -I$(MATRIXHOME)/lib/$(PLATFORM)
%.o: $(SRCDIR)/%.c
$(CC) $(CC_PICFLAG) $(CFLAGS) $(OFLAG) \
$(PERL_INCLUDE) $(MATRIX_INCLUDE) -c $<
#----------------------------------------------------------------------
# Link
#----------------------------------------------------------------------
MATRIX_LIBS = $(MATRIXHOME)/lib/$(PLATFORM)/mqlio32-64s.o
SYSLIBS = -lm -lsocket -lnsl
$(TARGET): Makefile $(OBJS)
$(CC) $(LD_PICFLAG) $(LDFLAGS) $(OBJS) $(MATRIX_LIBS) \
$(PERL_LIB) $(SYSLIBS) -o $@
#----------------------------------------------------------------------
# SWIG - Build Wrapper
#----------------------------------------------------------------------
swig:
$(SWIG) $(SWIGOPTS) -o $(WRAPFILE) $(INTERFACE)
install:
cp MQL.pm $(PERL_SITE)
if [ ! -d $(PERL_AUTO) ]; then mkdir $(PERL_AUTO); fi
cp MQL.so $(PERL_AUTO)
touch $(PERL_AUTO)/MQL.bs
chmod a+r $(PERL_SITE)/MQL.pm
chmod a+rx $(PERL_AUTO)/MQL.so
chmod a+rx $(PERL_AUTO)/MQL.bs
dist:
clean:
rm -f *_wrap* *.o *.so *.doc MQL.pm core