2bdcb617afe28605e88d7c51c681ca9a30c6c638
[fmtools.git] / Makefile
blob2bdcb617afe28605e88d7c51c681ca9a30c6c638
1 # fmtools Makefile - just the basics for now
3 CC = gcc
4 CFLAGS = -Wall -O2
6 INSTALL = /usr/bin/install
8 # Since fmtools doesn't use configure, these paths are provided here
9 # to make packaging easier. Just override them when doing 'make install'.
11 BINPATH = $(DESTDIR)/usr/local/bin
12 BINMODE = 0755
13 MANPATH = $(DESTDIR)/usr/local/man/man1
14 MANMODE = 0644
16 TARGETS = fm fmscan
18 all: $(TARGETS)
20 fm: fm.c
21 $(CC) $(CFLAGS) -o fm fm.c -lm
23 fmscan: fmscan.c
24 $(CC) $(CFLAGS) -o fmscan fmscan.c -lm
26 clean:
27 rm -f *~ *.o $(TARGETS)
29 install: all install-bin install-man
31 install-bin:
32 if (test ! -d $(BINPATH)); \
33 then \
34 mkdir -p $(BINPATH); \
36 for f in $(TARGETS) ; do \
37 $(INSTALL) -m $(BINMODE) $$f $(BINPATH); \
38 done
40 install-man:
41 if (test ! -d $(MANPATH)); \
42 then \
43 mkdir -p $(MANPATH); \
45 for f in $(TARGETS) ; do \
46 $(INSTALL) -m $(MANMODE) $$f.1 $(MANPATH); \
47 done
49 devices:
50 mknod /dev/radio0 c 81 64
51 ln -s /dev/radio0 /dev/radio