summaryrefslogtreecommitdiffstats
path: root/src/Makefile
blob: ba8b1c8c52cdbd7eb4314abd40790e10d10f70dd (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
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
DAEMON_OBJS += $(addprefix plugins/ifw/,plugin.o ifw_dbus.o ipset.o white_list.o black_list.o report_list.o libnl_ifw.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)