File: Makefile

package info (click to toggle)
fmtools 1.0.2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 104 kB
  • ctags: 291
  • sloc: ansic: 738; makefile: 74
file content (51 lines) | stat: -rw-r--r-- 953 bytes parent folder | download | duplicates (3)
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
# fmtools Makefile - just the basics for now

CC	= gcc
CFLAGS	= -Wall -O2

INSTALL	= /usr/bin/install

# Since fmtools doesn't use configure, these paths are provided here
# to make packaging easier.  Just override them when doing 'make install'.

BINPATH	= $(DESTDIR)/usr/local/bin
BINMODE = 0755
MANPATH = $(DESTDIR)/usr/local/man/man1
MANMODE = 0644

TARGETS	= fm fmscan

all: $(TARGETS)

fm: fm.c
	$(CC) $(CFLAGS) -o fm fm.c -lm

fmscan: fmscan.c
	$(CC) $(CFLAGS) -o fmscan fmscan.c -lm

clean: 
	rm -f *~ *.o $(TARGETS)

install: all install-bin install-man

install-bin:
	if (test ! -d $(BINPATH)); \
	then \
		mkdir -p $(BINPATH); \
	fi
	for f in $(TARGETS) ; do \
		$(INSTALL) -m $(BINMODE) $$f $(BINPATH); \
	done

install-man:
	if (test ! -d $(MANPATH)); \
	then \
		mkdir -p $(MANPATH); \
	fi
	for f in $(TARGETS) ; do \
		$(INSTALL) -m $(MANMODE) $$f.1 $(MANPATH); \
	done	

devices:
	mknod /dev/radio0 c 81 64
	ln -s /dev/radio0 /dev/radio