diff --git a/lib/Makefile b/lib/Makefile index 05fab01e23fb..a5ab970f014b 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -69,6 +69,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ ${_libnetgraph} \ ${_libngatm} \ libnv \ + libohash \ libopie \ libpam \ libpcap \ diff --git a/lib/libohash/Makefile b/lib/libohash/Makefile new file mode 100644 index 000000000000..198093e289b0 --- /dev/null +++ b/lib/libohash/Makefile @@ -0,0 +1,9 @@ +# $FreeBSD$ + +LIB= ohash +SRCS= ohash.c +INTERNALLIB= + +WARNS= 3 + +.include diff --git a/usr.bin/m4/lib/ohash.c b/lib/libohash/ohash.c similarity index 100% rename from usr.bin/m4/lib/ohash.c rename to lib/libohash/ohash.c diff --git a/usr.bin/m4/lib/ohash.h b/lib/libohash/ohash.h similarity index 100% rename from usr.bin/m4/lib/ohash.h rename to lib/libohash/ohash.h diff --git a/usr.bin/m4/lib/ohash_init.3 b/lib/libohash/ohash_init.3 similarity index 100% rename from usr.bin/m4/lib/ohash_init.3 rename to lib/libohash/ohash_init.3 diff --git a/usr.bin/m4/lib/ohash_interval.3 b/lib/libohash/ohash_interval.3 similarity index 100% rename from usr.bin/m4/lib/ohash_interval.3 rename to lib/libohash/ohash_interval.3 diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index a36642021b99..09a44ee2d526 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -44,3 +44,7 @@ LIBUCL?= ${LIBUCLDIR}/libucl.a LIBREADLINEDIR= ${ROOTOBJDIR}/gnu/lib/libreadline/readline LDREADLINE?= ${LIBREADLINEDIR}/libreadline.a LIBREADLINE?= ${LIBREADLINEDIR}/libreadline.a + +LIBOHASHDIR= ${ROOTOBJDIR}/lib/libohash +LDOHASH?= ${LIBOHASHDIR}/libohash.a +LIBOHASH?= ${LIBOHASHDIR}/libohash.a diff --git a/usr.bin/m4/Makefile b/usr.bin/m4/Makefile index 4f71244da9ce..47cbe3ed18c0 100644 --- a/usr.bin/m4/Makefile +++ b/usr.bin/m4/Makefile @@ -7,16 +7,13 @@ .include PROG= m4 -CFLAGS+=-DEXTENDED -I${.CURDIR} -I${.CURDIR}/lib -DPADD= ${LIBY} ${LIBL} ${LIBM} -LDADD= -ly -ll -lm +CFLAGS+=-DEXTENDED -I${.CURDIR} -I${.CURDIR}/../../lib/libohash +DPADD= ${LIBY} ${LIBL} ${LIBM} ${LIBOHASH} +LDADD= -ly -ll -lm ${LDOHASH} NO_WMISSING_VARIABLE_DECLARATIONS= SRCS= eval.c expr.c look.c main.c misc.c gnum4.c trace.c parser.y tokenizer.l -.PATH: ${.CURDIR}/lib -SRCS+= ohash.c -WARNS= 3 tokenizer.o: parser.h