3 CFLAGS ?
= -Wall
-Wno-pointer-sign
-g
-O0
`pkg-config libxml-2.0 --cflags` -Werror
-std
=gnu99
4 LDFLAGS ?
= -lssl
-lbfd
-ldl
-Wl
,-rpath
=`pwd`
5 OBJS
:= main.o crash.o backtrace-symbols.o
6 MODS
:= mod.O entities.O
7 MOD_LDFLAGS ?
= -lcurl
`pkg-config libxml-2.0 --libs` -lmagic
-ltdb
11 SHARED_HEADERS
= shared.h owner.h
12 MOD_HEADERS
= $(SHARED_HEADERS
) entities.h mod.h
13 CORE_HEADERS
= $(SHARED_HEADERS
) mod.h core.h
16 @echo
"static char owner[] = \"`whoami`\";" > owner.h
21 %.o
: %.c
$(CORE_HEADERS
)
23 @
$(CC
) -c
$(INCLUDES
) $(CFLAGS
) $(LIBRARY_DEFINES
) $< -o
$@
25 %.o
: %.
cpp $(CORE_HEADERS
)
27 @
$(CXX
) -c
$(INCLUDES
) $(CXXFLAGS
) $(LIBRARY_DEFINES
) $< -o
$@
29 %.O
: %.c
$(MOD_HEADERS
)
31 @
$(CC
) -c
$(INCLUDES
) $(CFLAGS
) -fPIC
$(LIBRARY_DEFINES
) $< -o
$@
37 @
$(CC
) $(CFLAGS
) $(OBJS
) $(LDFLAGS
) -o
$@
41 @
$(CC
) $(CFLAGS
) -fPIC
-shared
$(MODS
) $(MOD_LDFLAGS
) -o
$@
44 rm -f fillybot mod.so
*.o
*.O
*~ owner.h