-
Notifications
You must be signed in to change notification settings - Fork 13
/
makefile
66 lines (50 loc) · 1.39 KB
/
makefile
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
66
# This file is part of dcled, written on Sun Jan 4 00:18:16 PST 2009
# Jeff Jahr <[email protected]> -jsj
# What goes into the archive?
DISTFILES= dcled.c makefile README README-MACOS 40-dcled.rules
# INSTALLDIR is where the binaries get installed
INSTALLDIR=/usr/local/bin
FONTDIR="/usr/local/share/dcled"
DCLEDVERSION="2.0"
DIST=dcled-$(DCLEDVERSION)
# If gcc isnt your compiler, change it here.
CC=gcc
CFLAGS= -g -O3 -DFONTDIR='$(FONTDIR)' -DDCLEDVERSION='$(DCLEDVERSION)'
LDFLAGS= -g -lm -lhid
# You probaby dont need to change anything below this line...
# List of the various files
CFILES= dcled.c
HFILES=
OFILES= dcled.o
# build everything
all: dcled
dcled: dcled.o
$(CC) dcled.o -o dcled $(LDFLAGS)
# rebuild the ctags
ctags: $(HFILES) $(CFILES)
ctags -d -I -l c -t $(HFILES) $(CFILES)
# remove the object files
clean:
rm -i $(OFILES) dcled
# copy stuff into the install directory
install:
mkdir -p $(FONTDIR)
cp fonts/*.dlf $(FONTDIR)
mkdir -p $(INSTALLDIR)
cp dcled $(INSTALLDIR)
#
# Now run 'make udev' if you want to install the device permissions.
#
udev:
cp 40-dcled.rules /lib/udev/rules.d
service udev restart
# Done!
dist:
mkdir ${DIST}
cp ${DISTFILES} ${DIST}
cp -r fonts ${DIST}
tar -cvzf ${DIST}.tgz ${DIST}
# ...and now the dependencies.
dcled.o : dcled.c
$(CC) -c $(CFLAGS) dcled.c
# Still reading? Then the problem probably isnt with this file. ;) -jsj