|
| 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 | + |
0 commit comments