3 CFLAGS ?
= -Wall
-Wno-pointer-sign
-g
-O0
`pkg-config libxml-2.0 --cflags` -Werror
-std
=gnu99
-fstack-protector-all
4 LDFLAGS ?
= -lssl
-lbfd
-ldl
-Wl
,-rpath
,\
$$ORIGIN -liberty
-pie
-fPIE
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
12 SHARED_HEADERS
= shared.h owner.h
13 MOD_HEADERS
= $(SHARED_HEADERS
) entities.h mod.h
14 CORE_HEADERS
= $(SHARED_HEADERS
) mod.h core.h
17 @echo
"static char owner[] = \"`whoami`\";" > owner.h
22 %.o
: %.c
$(CORE_HEADERS
)
24 @
$(CC
) -c
$(INCLUDES
) $(CFLAGS
) -fPIE
$(LIBRARY_DEFINES
) $< -o
$@
26 %.o
: %.
cpp $(CORE_HEADERS
)
28 @
$(CXX
) -c
$(INCLUDES
) $(CXXFLAGS
) -fPIE
$(LIBRARY_DEFINES
) $< -o
$@
30 %.O
: %.c
$(MOD_HEADERS
)
32 @
$(CC
) -c
$(INCLUDES
) $(CFLAGS
) -Wno-unused-result
-fPIC
$(LIBRARY_DEFINES
) $< -o
$@
38 @
$(CC
) $(CFLAGS
) $(OBJS
) $(LDFLAGS
) -o
$@
42 @
$(CC
) $(CFLAGS
) -fPIC
-shared
$(MODS
) $(MOD_LDFLAGS
) -o
$@
45 rm -f fillybot mod.so
*.o
*.O
*~ owner.h