How to make static library with make.mpd, Is here a bug?
LukeMouse opened this issue · 2 comments
I'm working under linux recently, and I want to create a static library, so my mpc file as follow
project(XXX){
staticname=XXX
...
}
but when I use mwc.pl to generate make type project script, I got the Makefile as follow:
......
AREXT = .a
LIB =
SOEXT = .so **// here
SHTARGETDIR = ./
SHLIB =
...
all: $(SHLIB) // and here
@$(TESTDIRSTART) "$(SHTARGETDIR)"
but par of the make.mpd file as follow
....
<%if(staticname)%>
AREXT = <%lib_ext%>
LIB =
<%endif%>
<%endif%>
<%if(dll_ext && sharedname)%>
SOEXT = <%dll_ext%>
SHTARGETDIR = <%if(dllout)%><%dllout%><%if(!compares(dllout, .))%><%output_dir_ext%><%endif%><%else%><%libout%><%if(!compares(libout, .))%><%output_dir_ext%><%endif%><%endif%><%slash%><%targetoutdir%>
<%if(version && versupport)%>
SHLIB_BASE =
<%endif%>
SHLIB =
<%if(shflags)%>
SHFLAGS = <%shflags%>
<%endif%>
......
if every thing is ok, by no means it will generate script as above, can anyone help me out?
Add the following. It will instruct MPC to not default the sharedname and thus will only generate for a static library:
sharedname =
@ocielliottc It works,thank you very much , you do me a great help. but @jwillemsen Is there a better solution?