summaryrefslogtreecommitdiff
path: root/Makefile.am
blob: 0d726c48fc429411b8231c7dc33ac8097368d5b5 (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
dhcphookdir = /etc/dhcp3/dhclient-exit-hooks.d
ppphookdir = /etc/ppp/ip-up.d
pppwanlbdir = /var/load-balance/ppp
cfgdir = $(datadir)/vyatta-cfg/templates
opdir = $(datadir)/vyatta-op/templates
bin_sudo_usersdir = $(bindir)/sudo-users
curverdir = $(sysconfdir)/config-migrate/current

initddir	 = /etc/init.d
etcdir           = /etc

AM_CPPFLAGS = -I src -Wall -DDEBUG

CLEANFILES = src/main.o src/lbdata.o src/lbdatafactory.o src/loadbalance.o src/rl_str_proc.o src/lbpathtest.o src/lbtest_icmp.o src/lbtest_ttl.o src/lboutput.o src/lbtest.o

sbin_SCRIPTS = scripts/vyatta-wanloadbalance.pl
sbin_SCRIPTS += scripts/vyatta-wanloadbalance.init

bin_sudo_users_SCRIPTS  = scripts/vyatta-wlb-status
bin_sudo_users_SCRIPTS  += scripts/vyatta-wlb-connection.pl

dhcphook_SCRIPTS = scripts/dhcp/dhcp-wanlb
ppphook_SCRIPTS = scripts/ppp/ppp-wanlb

curver_DATA = cfg-version/wanloadbalance@2

src_wan_lb_SOURCES = src/main.cc
src_wan_lb_SOURCES += src/lbdata.cc
src_wan_lb_SOURCES += src/lbdatafactory.cc
src_wan_lb_SOURCES += src/loadbalance.cc
src_wan_lb_SOURCES += src/rl_str_proc.cc
src_wan_lb_SOURCES += src/lbpathtest.cc
src_wan_lb_SOURCES += src/lbtest_icmp.cc
src_wan_lb_SOURCES += src/lbtest_ttl.cc
src_wan_lb_SOURCES += src/lbdecision.cc
src_wan_lb_SOURCES += src/lboutput.cc
src_wan_lb_SOURCES += src/lbtest.cc

sbin_PROGRAMS = src/wan_lb

cpiop = find  . ! -regex '\(.*~\|.*\.bak\|.*\.swp\|.*\#.*\#\)' -print0 | \
	cpio -0pd

install-exec-hook:
	mkdir -p $(DESTDIR)$(dhcphookdir)
	mkdir -p $(DESTDIR)$(pppwanlbdir)
	mkdir -p $(DESTDIR)$(ppphookdir)
	mkdir -p $(DESTDIR)$(cfgdir)
	cd templates; $(cpiop) $(DESTDIR)$(cfgdir)
	mkdir -p $(DESTDIR)$(opdir)
	cd templates-op; $(cpiop) $(DESTDIR)$(opdir)
	mkdir -p $(DESTDIR)/etc
	cd etc; $(cpiop) $(DESTDIR)/etc