aboutsummaryrefslogtreecommitdiffstats
path: root/GNUmakefile
blob: 0479955af3d6e5c83cd171fdb2f3c059876f6035 (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
54
55
56
57
58
59
60
61
62
# config
-include Make.config
include mk/Variables.mk

# add our flags + libs
CFLAGS	+= -DVERSION='"$(VERSION)"'
LDLIBS	+= -lm

# build
TARGETS	:= lsinput input-events input-kbd input-send input-recv lircd.conf
HEADERS	:= EV.h REL.h KEY.h BTN.h BUS.h

# default target
all: build


#################################################################
# poor man's autoconf ;-)

include mk/Autoconf.mk

define make-config
LIB		:= $(LIB)
endef


########################################################################
# rules

build: $(TARGETS)

$(HEADERS): name.sh
	sh name.sh $* > $@

lircd.conf: lirc.sh 
	sh lirc.sh > $@

lsinput: lsinput.o input.o
input-events: input-events.o input.o
input-kbd: input-kbd.o input.o
input-send: input-send.o input.o tcp.o
input-recv: input-recv.o input.o tcp.o

input.o: input.c $(HEADERS)

install: build
	install -d $(bindir)
	install -s lsinput input-events input-kbd input-send input-recv $(bindir)

clean:
	-rm -f *.o $(depfiles)

realclean distclean: clean
	-rm -f Make.config
	-rm -f $(TARGETS) $(HEADERS) *~ xpm/*~ *.bak

#############################################

include mk/Compile.mk
include mk/Maintainer.mk
-include $(depfiles)