[Snort-users] QUERY:Building snort statically

Senthil Prabu.S prabu333 at ...8908...
Tue Feb 15 21:02:07 EST 2005


Hi William,
         As Joshnu said, plz make the following change in the src/Makefile along
with the changes that I mentioned in my first mail. This would not only build
snort with static dependent libraries, but aslo a static version of snort 
binary.


> I went to the snort-2.1.1/src/Makefile and done a search for
> snort_LDFLAGS and found one occurance of it in this section:
> snort$(EXEEXT): $(snort_OBJECTS) $(snort_DEPENDENCIES)
> @rm -f snort$(EXEEXT)
> $(LINK) $(snort_LDFLAGS) $(snort_OBJECTS) $(snort_LDADD) $(LIBS)
>
> I could not find what snort_LDFLAGS was assigned to inorder to change it
> to be static.
>
> I then looked at the makefile one directory up, that is snort-2.1.1 and
> no snort_LDFLAGS was found. However
> I did find a LDFLAGS parameter:
> LDFLAGS =  -L/usr/local/lib -lpcre

No, you are wrong, here LDFLAGS is defined to look for the path of libprce
library. Also in snort-2.1.1, under src/Makefile, I am able to find the 
snort_LDFLAGS
The details and modificaton is given below. Also this flag is available in 
snort-2.3.0.

File : src/Makefile
Line Number: 161

BEFORE:
        preprocessors/flow/libflow.a parser/libparser.a \
        preprocessors/HttpInspect/libhttp_inspect.a sfutil/libsfutil.a
 snort_LDFLAGS =

      DEFS = -DHAVE_CONFIG_H
      DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)

AFTER:
        preprocessors/flow/libflow.a parser/libparser.a \
        preprocessors/HttpInspect/libhttp_inspect.a sfutil/libsfutil.a
 snort_LDFLAGS = -lstatic

      DEFS = -DHAVE_CONFIG_H
      DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)

--
Senthil Prabu.S


If you are smart enough to know that you're not smart enough to be an
Engineer, then you're in Business.
_________________________________________________________________







More information about the Snort-users mailing list