Project

General

Profile

Bug #1261 ยป Makefile

dangole (Daniel Golle), 03/13/2009 02:59 AM

 
1

    
2
SHELL = /bin/sh
3

    
4
#### Start of system configuration section. ####
5

    
6
srcdir = .
7
topdir = /home/daniel/src/makrowrt/openwrt/staging_dir/mips/usr/lib/ruby/1.8/mips-linux
8
hdrdir = $(topdir)
9
VPATH = $(srcdir):$(topdir):$(hdrdir)
10
prefix = $(DESTDIR)/home/daniel/src/makrowrt/openwrt/staging_dir/mips/usr
11
exec_prefix = $(DESTDIR)/usr
12
sitedir = $(prefix)/lib/ruby/site_ruby
13
rubylibdir = $(libdir)/ruby/$(ruby_version)
14
docdir = $(datarootdir)/doc/$(PACKAGE)
15
dvidir = $(docdir)
16
datarootdir = $(prefix)/share
17
archdir = $(rubylibdir)/$(arch)
18
sbindir = $(DESTDIR)/usr/sbin
19
psdir = $(docdir)
20
localedir = $(datarootdir)/locale
21
htmldir = $(docdir)
22
datadir = $(DESTDIR)/usr/share
23
includedir = $(prefix)/include
24
infodir = $(DESTDIR)/usr/info
25
sysconfdir = $(DESTDIR)/etc
26
mandir = $(DESTDIR)/usr/man
27
libdir = $(exec_prefix)/lib
28
sharedstatedir = $(prefix)/com
29
oldincludedir = $(DESTDIR)/usr/include
30
pdfdir = $(docdir)
31
sitearchdir = $(sitelibdir)/$(sitearch)
32
bindir = $(DESTDIR)/usr/bin
33
localstatedir = $(DESTDIR)/var
34
sitelibdir = $(sitedir)/$(ruby_version)
35
libexecdir = $(DESTDIR)/usr/lib
36

    
37
CC = mips-linux-uclibc-gcc
38
LIBRUBY = $(LIBRUBY_SO)
39
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
40
LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
41
LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
42

    
43
RUBY_EXTCONF_H = 
44
CFLAGS   =  -fPIC -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts   -fPIC 
45
INCFLAGS = -I. -I. -I/home/daniel/src/makrowrt/openwrt/staging_dir/mips/usr/lib/ruby/1.8/mips-linux -I.
46
DEFS     = -D_FILE_OFFSET_BITS=64
47
CPPFLAGS =  -I/home/daniel/src/makrowrt/openwrt/staging_dir/mips/usr/include -I/home/daniel/src/makrowrt/openwrt/staging_dir/mips/include  -D_FILE_OFFSET_BITS=64
48
CXXFLAGS = $(CFLAGS) 
49
DLDFLAGS = -L. -L/home/daniel/src/makrowrt/openwrt/staging_dir/toolchain-mips_gcc4.1.2/lib -L/home/daniel/src/makrowrt/openwrt/staging_dir/mips/usr/lib -L/home/daniel/src/makrowrt/openwrt/staging_dir/mips/lib -L/home/daniel/src/makrowrt/openwrt/build_dir/mips/ruby-1.8.6-p287  -rdynamic -Wl,-export-dynamic  
50
LDSHARED = $(CC) -shared
51
AR = mips-linux-uclibc-ar
52
EXEEXT = 
53

    
54
RUBY_INSTALL_NAME = ruby
55
RUBY_SO_NAME = ruby
56
arch = mips-linux
57
sitearch = mips-linux
58
ruby_version = 1.8
59
ruby = /home/daniel/src/makrowrt/openwrt/staging_dir/mips/usr/bin/ruby
60
RUBY = $(ruby)
61
RM = rm -f
62
MAKEDIRS = mkdir -p
63
INSTALL = /bin/install -c
64
INSTALL_PROG = $(INSTALL) -m 0755
65
INSTALL_DATA = $(INSTALL) -m 644
66
COPY = cp
67

    
68
#### End of system configuration section. ####
69

    
70
preload = 
71

    
72
libpath = . $(libdir)
73
LIBPATH =  -L. -L$(libdir)
74
DEFFILE = 
75

    
76
CLEANFILES = mkmf.log
77
DISTCLEANFILES = 
78

    
79
extout = 
80
extout_prefix = 
81
target_prefix = /makrocode
82
LOCAL_LIBS = 
83
LIBS = $(LIBRUBYARG_SHARED) -lz  -ldl -lcrypt -lm   -lc
84
SRCS = dsa.c rb-makrotoken.c makrotoken.c tauthority.c
85
OBJS = dsa.o rb-makrotoken.o makrotoken.o tauthority.o
86
TARGET = makrotoken
87
DLLIB = $(TARGET).so
88
EXTSTATIC = 
89
STATIC_LIB = 
90

    
91
RUBYCOMMONDIR = $(sitedir)$(target_prefix)
92
RUBYLIBDIR    = $(sitelibdir)$(target_prefix)
93
RUBYARCHDIR   = $(sitearchdir)$(target_prefix)
94

    
95
TARGET_SO     = $(DLLIB)
96
CLEANLIBS     = $(TARGET).so $(TARGET).il? $(TARGET).tds $(TARGET).map
97
CLEANOBJS     = *.o *.a *.s[ol] *.pdb *.exp *.bak
98

    
99
all:		$(DLLIB)
100
static:		$(STATIC_LIB)
101

    
102
clean:
103
		@-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
104

    
105
distclean:	clean
106
		@-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
107
		@-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
108

    
109
realclean:	distclean
110
install: install-so install-rb
111

    
112
install-so: $(RUBYARCHDIR)
113
install-so: $(RUBYARCHDIR)/$(DLLIB)
114
$(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
115
	$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
116
install-rb: pre-install-rb install-rb-default
117
install-rb-default: pre-install-rb-default
118
pre-install-rb: Makefile
119
pre-install-rb-default: Makefile
120
$(RUBYARCHDIR):
121
	$(MAKEDIRS) $@
122

    
123
site-install: site-install-so site-install-rb
124
site-install-so: install-so
125
site-install-rb: install-rb
126

    
127
.SUFFIXES: .c .m .cc .cxx .cpp .C .o
128

    
129
.cc.o:
130
	$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
131

    
132
.cxx.o:
133
	$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
134

    
135
.cpp.o:
136
	$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
137

    
138
.C.o:
139
	$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
140

    
141
.c.o:
142
	$(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $<
143

    
144
$(DLLIB): $(OBJS)
145
	@-$(RM) $@
146
	$(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
147

    
148

    
149

    
150
$(OBJS): ruby.h defines.h