summaryrefslogtreecommitdiffstats
path: root/src/Makefile
blob: 4ac87836726fc2ea6a701955ecfbe131a5a5381d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
CC = gcc
CFLAGS = -Wall -g
DEFS = -DDBUS_API_SUBJECT_TO_CHANGE=1
INCLUDES = $(shell pkg-config dbus-1 --cflags) -I$(PWD)
LDFLAGS =  $(shell pkg-config dbus-1 --libs)

DAEMON_LDFLAGS =
DAEMON_OBJS = mandi_daemon.o
DAEMON_TARGET = mandi

DAEMON_OBJS += $(addprefix plugins/wireless/,plugin.o wpa_ctrl.o)

#CFLAGS += -DIFW_FAKE
CFLAGS += -DIFW_LISTEN_FAKE
DAEMON_OBJS += $(addprefix plugins/ifw/,plugin.o ifw_dbus.o ipset.o white_list.o black_list.o report_list.o libnl_ifw.o)

DAEMON_OBJS += $(addprefix plugins/ifw_listen/,plugin.o ifw_listen_dbus.o)

all: $(DAEMON_TARGET)

.c.o:
	$(CC) $(CFLAGS) $(DEFS) $(INCLUDES) -c $< -o $@

$(DAEMON_TARGET): $(DAEMON_OBJS)
	$(CC) $(CFLAGS) $(DAEMON_OBJS) $(LDFLAGS) $(DAEMON_LDFLAGS) -o $@

clean:
	rm -f $(DAEMON_OBJS) $(DAEMON_TARGET)