mirror of
https://git.freebsd.org/ports.git
synced 2025-06-20 20:20:30 -04:00
as the standalone language. This version is LGPLed (Library GPL) so you can link it with your own code, whether open-source or proprietary. You still need TRE. Note that with improvements come costs: libcrm114 classifiers are NOT compatible with standalone CRM114 class files. WWW: http://crm114.sourceforge.net/ PR: ports/169296 Submitted by: Martin Schuette <info@mschuette.name> Feature safe: yes
65 lines
2 KiB
Text
65 lines
2 KiB
Text
--- Makefile.orig 2010-05-06 20:14:55.000000000 +0200
|
|
+++ Makefile 2012-05-19 21:10:00.000000000 +0200
|
|
@@ -31,7 +31,7 @@
|
|
#CFLAGS += -O3 -DDO_INLINES
|
|
#
|
|
#GCC flags for debugging, no optimization
|
|
-CFLAGS += -g
|
|
+#CFLAGS += -g
|
|
#
|
|
#GCC and LD flags for debugging, no optimization, and profile for speed
|
|
#CFLAGS += -g -pg
|
|
@@ -45,6 +45,8 @@
|
|
CFLAGS += -std=c99 -pedantic -Wall -Wextra -Wpointer-arith -Wstrict-prototypes
|
|
#well, pretty carefully
|
|
CFLAGS += -Wno-sign-compare -Wno-overlength-strings
|
|
+# to build shared library
|
|
+CFLAGS += -fPIC
|
|
|
|
#These are optional.
|
|
|
|
@@ -97,8 +99,8 @@
|
|
crm114_util.o \
|
|
crm114_regex_tre.o
|
|
|
|
-
|
|
-all: test simple_demo
|
|
+# .tar.gz includes linux object files -- so clean first
|
|
+all: clean libcrm114.so test simple_demo
|
|
|
|
test: test.o libcrm114.a
|
|
$(CC) -o test $(LDFLAGS) -Wl,-M -Wl,--cref test.o libcrm114.a -ltre -lm >test.map
|
|
@@ -115,6 +117,24 @@
|
|
libcrm114.a: $(LIBOBJS) Makefile
|
|
ar rc libcrm114.a $(LIBOBJS)
|
|
|
|
+# added for FreeBSD port patch
|
|
+libcrm114.so.0: $(LIBOBJS) Makefile
|
|
+ $(CC) -o libcrm114.so.0 -shared $(LIBOBJS)
|
|
+
|
|
+libcrm114.so: libcrm114.so.0
|
|
+ ln -fs libcrm114.so.0 libcrm114.so
|
|
+
|
|
+install: libcrm114.so.0
|
|
+ $(BSD_INSTALL_LIB) libcrm114.so.0 $(PREFIX)/lib
|
|
+ ln -fs libcrm114.so.0 $(PREFIX)/lib/libcrm114.so
|
|
+ $(BSD_INSTALL_DATA) crm114_config.h $(PREFIX)/include
|
|
+ $(BSD_INSTALL_DATA) crm114_lib.h $(PREFIX)/include
|
|
+ $(BSD_INSTALL_DATA) crm114_structs.h $(PREFIX)/include
|
|
+ $(BSD_INSTALL_DATA) crm114_sysincludes.h $(PREFIX)/include
|
|
+ $(BSD_INSTALL_DATA) -d $(PREFIX)/share/doc/libcrm114
|
|
+ $(BSD_INSTALL_DATA) HOWTO.txt $(PREFIX)/share/doc/libcrm114
|
|
+ $(BSD_INSTALL_DATA) simple_demo.c $(PREFIX)/share/doc/libcrm114
|
|
+
|
|
$(LIBOBJS): $(LIBHDRS)
|
|
|
|
clean: clean_test clean_simple_demo clean_lib clean_profiling
|
|
@@ -126,7 +146,7 @@
|
|
rm -f simple_demo simple_demo.map simple_demo.o simple_demo_datablock.txt
|
|
|
|
clean_lib:
|
|
- rm -f libcrm114.a $(LIBOBJS)
|
|
+ rm -f libcrm114.a libcrm114.so $(LIBOBJS)
|
|
|
|
clean_profiling:
|
|
rm -f gmon.out *.gcov *.gcno *.gcda
|