Skip to content
This repository was archived by the owner on Jun 13, 2018. It is now read-only.

Commit 67f198e

Browse files
author
karoto
committed
Initial revision
git-svn-id: https://svn.code.sf.net/p/sakura-editor/code/Bregexp/trunk@3 f7ce1907-e4c7-47ca-9f76-12c87ed2c91c
1 parent 18ea8a2 commit 67f198e

15 files changed

+6126
-0
lines changed

Makefile

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#
2+
# bregexp library make file for RedHat Linux 6.1
3+
# version 1.0 1999.11.24 Tatsuo Baba
4+
#
5+
# bregexp.h header file
6+
# libbregexp.so shared library
7+
# libbregexp.a static library
8+
#
9+
#
10+
CC = gcc
11+
CPP = g++
12+
AR = ar
13+
RANLIB = ranlib
14+
CPFLAGS = -fPIC -c -O
15+
INSTINCLUDE = /usr/include
16+
INSTLIB = /usr/lib
17+
#
18+
HEADERFILE = bregexp.h
19+
LIBNAME = libbregexp
20+
SONAME = $(LIBNAME).so.1
21+
SHAREDLIBNAME = $(LIBNAME).so.1.0
22+
STATICLIBNAME = $(LIBNAME).a
23+
#
24+
#
25+
all : main.o bregcomp.o bsubst.o bregexec.o bsplit.o btrans.o sv.o
26+
$(CC) -shared -Wl,-soname,$(SONAME) -o $(SHAREDLIBNAME) main.o bregcomp.o bsubst.o bregexec.o bsplit.o btrans.o sv.o
27+
$(AR) rv $(STATICLIBNAME) main.o bregcomp.o bsubst.o bregexec.o bsplit.o btrans.o sv.o
28+
$(RANLIB) $(STATICLIBNAME)
29+
30+
main.o : main.cc sv.h bregexp.h global.h intreg.h
31+
32+
bregexec.o : bregexec.cc sv.h global.h intreg.h
33+
34+
bregcomp.o : bregcomp.cc sv.h global.h intreg.h
35+
36+
bsubst.o : bsubst.cc sv.h global.h intreg.h
37+
38+
bsplit.o : bsplit.cc sv.h global.h intreg.h
39+
40+
btrans.o : btrans.cc sv.h global.h intreg.h
41+
42+
sv.o : sv.cc sv.h
43+
44+
clean :
45+
rm -f *.o
46+
rm -f $(STATICLIBNAME) $(SHAREDLIBNAME)
47+
48+
install :
49+
cp $(HEADERFILE) $(INSTINCLUDE)
50+
@chmod o+r $(INSTINCLUDE)/$(HEADERFILE)
51+
cp $(STATICLIBNAME) $(INSTLIB)
52+
cp $(SHAREDLIBNAME) $(INSTLIB)
53+
ldconfig $(INSTLIB)
54+
@rm -f $(INSTLIB)/$(LIBNAME).so
55+
ln -s $(INSTLIB)/$(SONAME) $(INSTLIB)/$(LIBNAME).so
56+
57+
.cc.o:
58+
$(CPP) $(CPFLAGS) $<
59+

README

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
2+
Bregexp is a Regular Expression library.
3+
4+
Copyright (c) 1999 Tatsuo Baba. All rights reserved.
5+
6+
This package is based on perl 5 source. Therefore regular expression
7+
syntax is same as perl 5.
8+
9+
This package is free software; you can redistribute it and/or
10+
modify it under the same terms as Perl itself.
11+
12+
See perl_license.txt for details of Perl license.
13+
14+
Author has built only against:
15+
RedHat Linux 6.1 (x86)
16+
g++
17+
gcc
18+
19+
I have not tried other target.
20+
So please mail me the Makefile if you tried other platform.
21+
22+
23+
usage:
24+
$ make
25+
$ su
26+
password:
27+
# make install
28+
29+
$ gcc sample.c -lbregexp
30+
$ ./a.out /home/
31+
32+
33+

0 commit comments

Comments
 (0)