# Both with <bsd.lib.mk> compile only the shared library?



## ogogon (Oct 19, 2014)

Colleagues, I have a question about the use of bsd.lib.mk.

I need to compile a port, which is one of several modules for the language Lua. According to the rules of the language Lua, each module is compiled as a dynamic library *.so, and without the prefix lib.

I use

```
include <bsd.lib.mk>
```

In order to remove the prefix lib I modified a Makefile by adding the line 
	
	



```
SHLIB_NAME = ${SHLIB}.so.${SHLIB_MAJOR}
```

However, at the same time, the compiler also compiles other formats of my library, which I absolutely do not need. In particular, *..a and *_p.a.

How should I change my Makefile, so that it does not build static libraries?

My Makefile:

```
LIB= mymodule
SHLIB_MAJOR= 1
SHLIB_NAME= ${SHLIB}.so.${SHLIB_MAJOR}
CFLAGS+= -Wall -I${.CURDIR}
CFLAGS+= -g -I/usr/include -I/usr/local/include -I/usr/local/include/lua52
LDFLAGS+= -L/usr/lib -L/usr/local/lib -lc
SRCS= lua_mymodule.c
INCS= lua_mymodule.h
#MAN= lua_mymodule.3
WARNS?= 2

.include <bsd.lib.mk>
```
Ogogon.

P.S. This message has a very difficult life. At first, came a gentleman, made a page-proofs of my message and rebuke me in a letter. He explained that he can not always correct my flaws, though he helped me only once. Then came another gentleman, with a pink face and blue glasses. He set to work more resolutely and immediately deleted my message across. On this he also told me by e-mail, adding that if I want to, I can create a message again. What I'm doing now. It is strongly reminiscent of a young Mark Twain story about journalism in the Wild West.

Ladies and gentlemen, here you have going on?


----------

