summaryrefslogtreecommitdiff
path: root/src/Makefile
blob: ddbe29a8280decb16918468aa9bd0927d0c60625 (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
#
# src/Makefile
#
# 	This library is free software; you can redistribute it and/or
#	modify it under the terms of the GNU Lesser General Public
#	License as published by the Free Software Foundation version 2.1
#	of the License.
#
# Copyright (c) 2003-2006 Thomas Graf <tgraf@suug.ch>
#

ifeq ($(shell [ ! -r ../Makefile.opts ] && echo 1),)
    include ../Makefile.opts
endif

LDFLAGS	+= -L../lib -lnl utils.o
CIN 	:= $(wildcard nl-*.c) $(wildcard genl-*.c) $(wildcard nf-*.c)
TOOLS	:= $(CIN:%.c=%)

all: $(TOOLS)

$(TOOLS): utils.o

nl-%: nl-%.c
	@echo "  LD $@"; \
	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)

genl-%: genl-%.c
	@echo "  LD $@"; \
	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)

nf-%: nf-%.c
	@echo "  LD $@"; \
	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)

clean:
	@echo "  CLEAN src"; \
	rm -f $(TOOLS) utils.o

distclean: clean

install:
	@true

include ../Makefile.rules