File: Makefile

package info (click to toggle)
wmtemp 0.0.6-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 180 kB
  • ctags: 95
  • sloc: ansic: 777; makefile: 82
file content (48 lines) | stat: -rw-r--r-- 1,002 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
#CC=gcc
#LD=gcc
SED=sed
STRIP=strip

PREFIX?=/usr/local
DEST=$(PREFIX)/bin
MAN=$(PREFIX)/share/man/man1

CFLAGS?=-Wall -Werror -O2
LDFLAGS?=
INCLUDE=-I/usr/include/sensors -I/usr/local/include/sensors
LIBS=-L/usr/X11R6/lib -L/usr/local/lib -lX11 -lXext -lXpm -lsensors

XPM=xpm/celcius_on.o xpm/celcius_off.o xpm/fahrenheit_on.o \
	xpm/fahrenheit_off.o xpm/kelvin_on.o xpm/kelvin_off.o xpm/parts.o
OBJS=main.o dockapp.o temp.o $(XPM)
	
TARGET=wmtemp
MANPAGE=wmtemp.1x

all: $(TARGET)

%.c: %.xpm
	echo "#include \"xpm.h\"" >$@
	$(SED) -e "s/^static //" <$< >>$@

.c.o:
	$(CC) $(CFLAGS) $(INCLUDE) -c -o $@ $<

$(TARGET): $(OBJS)
	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)

clean:
	rm -f *.o xpm/*.o xpm/*.c core $(TARGET)

install:
	cp $(TARGET) $(DEST)/$(TARGET)
#	$(STRIP) $(DEST)/$(TARGET)
	chmod 755 $(DEST)/$(TARGET)
#	cp $(MANPAGE) $(MAN)/$(MANPAGE)
#	gzip -9 $(MAN)/$(MANPAGE)
#	chmod 644 $(MAN)/$(MANPAGE)
	
main.o: dockapp.h temp.h xpm/xpm.h
dockapp.o: dockapp.h
temp.o: temp.h
xpm/xpm.h: $(XPM)