]> git.ipfire.org Git - people/ms/mstpd.git/blob - Makefile
use versionsort when available
[people/ms/mstpd.git] / Makefile
1 version := 0.01
2
3 DSOURCES = main.c epoll_loop.c brmon.c bridge_track.c libnetlink.c mstp.c \
4 packet.c netif_utils.c ctl_socket_server.c hmac_md5.c driver_deps.c
5
6 DOBJECTS = $(DSOURCES:.c=.o)
7
8 CTLSOURCES = ctl_main.c ctl_socket_client.c
9
10 CTLOBJECTS = $(CTLSOURCES:.c=.o)
11
12 CFLAGS += -Werror -O2 -D_REENTRANT -D__LINUX__ -DVERSION=$(version) -I. \
13 -D_GNU_SOURCE -D__LIBC_HAS_VERSIONSORT__
14
15 all: mstpd mstpctl
16
17 mstpd: $(DOBJECTS)
18 $(CC) -o $@ $(DOBJECTS)
19
20 mstpctl: $(CTLOBJECTS)
21 $(CC) -o $@ $(CTLOBJECTS)
22
23 -include .depend
24
25 clean:
26 rm -f *.o *~ .depend.bak mstpd mstpctl
27
28 romfs: all
29 $(ROMFSINST) /sbin/mstpd
30 $(ROMFSINST) /sbin/mstpctl
31 $(ROMFSINST) /sbin/bridge-stp
32
33 #depend:
34 # makedepend -I. -Y *.c -f .depend