author | Markus Bröker <mbroeker@largo.dyndns.tv> |
Mon, 08 Mar 2010 18:30:04 +0100 | |
changeset 121 | fef2ccfa7b12 |
parent 66 | 2b4f786d9073 |
child 166 | ecd6492274ad |
permissions | -rw-r--r-- |
66
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
6
diff
changeset
|
1 |
CC = gcc |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
6
diff
changeset
|
2 |
CPP = g++ |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
6
diff
changeset
|
3 |
STRIP = strip -s |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
6
diff
changeset
|
4 |
INSTALL = cp -f |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
6
diff
changeset
|
5 |
RM = rm -f |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
6
diff
changeset
|
6 |
CFLAGS = -Wall -Wstrict-prototypes |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
6
diff
changeset
|
7 |
INCLUDE = -I/usr/local/include |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
6
diff
changeset
|
8 |
LDFLAGS = -L/usr/local/lib/ -llsf -Wl,--rpath,lib |
6
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
9 |
|
66
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
6
diff
changeset
|
10 |
OBJECTS = cpuid.o |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
6
diff
changeset
|
11 |
OBJECTS += main.o |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
6
diff
changeset
|
12 |
OBJECTS += digest.o |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
6
diff
changeset
|
13 |
OBJECTS += dump.o |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
6
diff
changeset
|
14 |
OBJECTS += list.o |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
6
diff
changeset
|
15 |
|
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
6
diff
changeset
|
16 |
TARGET = progs |
6
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
17 |
|
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
18 |
.c.o: |
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
19 |
$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< |
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
20 |
|
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
21 |
all: progs |
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
22 |
|
66
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
6
diff
changeset
|
23 |
progs: $(OBJECTS) |
6
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
24 |
$(CC) $(LDFLAGS) digest.o -o digest |
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
25 |
$(CC) $(LDFLAGS) dump.o -o dump |
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
26 |
$(CC) $(LDFLAGS) cpuid.o main.o -o cpuid |
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
27 |
$(CC) $(LDFLAGS) list.o -o list |
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
28 |
|
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
29 |
$(STRIP) digest |
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
30 |
$(STRIP) cpuid |
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
31 |
$(STRIP) dump |
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
32 |
$(STRIP) list |
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
33 |
|
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
34 |
.PHONY: clean distclean |
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
35 |
|
66
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
6
diff
changeset
|
36 |
clean: |
6
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
37 |
$(RM) *.o |
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
38 |
$(RM) *~ |
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
39 |
$(RM) digest cpuid dump list |
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
40 |
|
66
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
6
diff
changeset
|
41 |
distclean: |
6
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
42 |
@make clean |
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
43 |
|
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
44 |
install: progs |
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
45 |
$(INSTALL) digest $(HOME)/bin/ |
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
46 |
$(INSTALL) cpuid $(HOME)/bin/ |
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
47 |
$(INSTALL) dump $(HOME)/bin/ |
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
48 |
$(INSTALL) list $(HOME)/bin/ |
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
49 |
|
66
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
6
diff
changeset
|
50 |
uninstall: |
6
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
51 |
$(RM) $(HOME)/bin/digest |
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
52 |
$(RM) $(HOME)/bin/list |
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
53 |
$(RM) $(HOME)/bin/cpuid |
c3dc3eb3b541
a small libtool demo added to the demo distribution
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
54 |
$(RM) $(HOME)/bin/dump |