File: GNUmakefile

package info (click to toggle)
input-utils 1.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 380 kB
  • ctags: 1,091
  • sloc: ansic: 1,900; sh: 25; makefile: 6
file content (65 lines) | stat: -rw-r--r-- 1,360 bytes parent folder | download | duplicates (2)
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
63
64
65
# config
-include Make.config
include mk/Variables.mk

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

# build
TARGETS	:= lsinput input-events input-kbd lircd.conf
HEADERS	:= EV.h REL.h ABS.h MSC.h LED.h SND.h REP.h KEY.h BTN.h BUS.h SW.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_DIR) $(bindir) $(mandir)/man8
	$(INSTALL_BINARY) lsinput input-events input-kbd $(bindir)
	$(INSTALL_DATA) lsinput.man $(mandir)/man8/lsinput.8
	$(INSTALL_DATA) input-kbd.man $(mandir)/man8/input-kbd.8
	$(INSTALL_DATA) input-events.man $(mandir)/man8/input-events.8


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)