File: Makefile

package info (click to toggle)
gradio 1.0.1-6
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 200 kB
  • ctags: 178
  • sloc: ansic: 3,662; makefile: 61
file content (53 lines) | stat: -rw-r--r-- 1,806 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
# If you want the standard cyan-on-black LED color display,
# change this to STD_COLOR. You can also change colors in pixmaps.h
COLOR	= NO_STD_COLOR
#COLOR	= STD_COLOR

# If you live in Japan (or possibly elsewhere), you will need to uncomment
# one or both. GRadio uses driver-reported allowable frequency ranges, but
# not all drivers report these properly. Defining this sets a wider range
# of allowable frequencies; if your hardware cannot actually do this, the
# results may be unpredictable. WIDE_FREQ uses driver returns if possible,
# otherwise it uses a wider-than-normal (76.1-108.9 MHz) range. Setting
# OVERRIDE_FREQ will cause the driver-supplied values to be ignored.
#CFLAGS		+= -DWIDE_FREQ
#CFLAGS		+= -DOVERRIDE_FREQ

# If your 2.[12] kernel headers aren't in /usr/include(/linux),
# you'll need to specify their location here.
#KERNELINCS	= /usr/src/linux/include

# The directory into which you want to install
INSTALLROOT 	= /usr/local

# The directories in which the binary and man page should
# be installed.
BINDIR		= $(INSTALLROOT)/bin
MANDIR		= $(INSTALLROOT)/man/man1

# The device to access by default (can be changed at runtime)
DEVICE		= /dev/radio
DEVFS_DEVICE	= /dev/radio0

# These should be OK ---------------------------------------

CC	= cc
ALL_CFLAGS	= $(shell gtk-config --cflags) -O2 -Wall $(CFLAGS) -I$(KERNELINCS)
LIBS	= $(shell gtk-config --libs)
SRCS	= ui.c gradio-main.c callbacks.c interface.c lowlevel.c
OBJS	= $(SRCS:.c=.o)
HDRS	= gradio.h pixmaps.h logo.h
DEFS	= -D$(COLOR) -DDEV_NAME=\"$(DEVICE)\" -DDEVFS_DEV_NAME=\"$(DEVFS_DEVICE)\"

all: $(SRCS) $(HDRS) $(OBJS)
	$(CC) -o gradio $(OBJS) $(ALL_CFLAGS) $(LIBS)

install: gradio
	cp gradio $(BINDIR)
	cp gradio.1 $(MANDIR)

.c.o: $(HDRS)
	$(CC) -c $(ALL_CFLAGS) $(DEFS) $<

clean:
	rm -f *.o gradio *~ core