Imported Upstream version 2.7
[ossec-hids.git] / src / Makefile
1 # Makefile
2 # Daniel B. Cid <dcid@sourcefire.com>||<daniel@underlinux.com.br>
3 # http://www.ossec.net/hids/
4
5 none:
6                 @echo "Nothing selected ..."
7                 @echo "\"make all\" to compile everything."
8                 @echo "\"make server\" to build the server."
9                 @echo "\"make local\" to build the local."
10                 @echo "\"make agent\" to build the agent."
11                 @echo "\"make libs\" to build the libraries only."
12                 @echo "\"make clean\" to clean anything built."
13                 @echo "\"make setagent\" to set agent install."
14                 @echo "\"make setlocal\" to set local install."
15                 @echo "\"make setclang\" to use clang for building ossec."
16                 @echo "\"make unsetclang\" to use gcc for building ossec."
17                 @echo "\"make setprelude\" to enable prelude output."
18                 @echo "\"make setdb\" to enable database support."
19                 @echo "\"make unsetdb\" to disable database support."
20                 @echo "\"make setoneway\" to enable one-way connection to the manager."
21                 @echo "\"make setgeoip\" to enable source IP geolocalization."
22
23 clean:
24                 @/bin/sh ./Makeall clean
25                 rm -f ../bin/ossec*
26                 rm -f ../bin/manage_agents
27
28 all:
29                 @/bin/sh ./Makeall all
30
31 build:
32                 @/bin/sh ./Makeall build
33
34 libs:
35                 @/bin/sh ./Makeall libs
36
37 server:
38                 @/bin/sh ./InstallServer.sh
39
40 local:
41                 @/bin/sh ./InstallServer.sh local
42         
43 agent:
44                 @/bin/sh ./InstallAgent.sh
45         
46 setagent:
47                 @echo "CEXTRA=-DCLIENT" >> ./Config.OS
48
49 setclang:
50                 @sed -i '' -e "s/^CC=.*/CC=clang/g" LOCATION
51
52 unsetclang:
53                 @sed -i '' -e "s/^CC=.*/CC=gcc/g" LOCATION
54
55 setprelude:
56                 @echo "CPRELUDE=-DPRELUDE -lprelude `libprelude-config --pthread-cflags` `libprelude-config --libs`" >> ./Config.OS
57         
58 setgeoip:
59                 @echo "CGEOIP=-DGEOIP -I/usr/local/include -L/usr/local/lib -lGeoIP" >> ./Config.OS
60
61 setdb:
62                 @cd ./os_dbd; echo "CDB=`./dbmake.sh`" >> ../Config.OS;
63 setmaxagents:
64                 @/bin/sh ./Makeall setmaxagents
65 unsetdb:
66                 @echo "CDB=" >> ./Config.OS;
67 setlocal:
68                 @echo "CEXTRA=-DLOCAL" >> ./Config.OS
69
70 setfullsubject:
71                 @echo "FEXTRA=-DCLEANFULL" >> ./Config.OS
72 setoneway:
73                 @echo "FEXTRA=-DONEWAY" >> ./Config.OS