lsflib/tools/Makefile
author Markus Bröker <mbroeker@largo.dyndns.tv>
Mon, 09 Sep 2013 15:51:32 +0200
changeset 166 ecd6492274ad
parent 66 2b4f786d9073
permissions -rw-r--r--
Test committer: Markus Bröker <mbroeker@largo.homelinux.org>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
166
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 66
diff changeset
     8
 LDFLAGS = -L/usr/local/lib/ -llsf -lcrypto -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)
166
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 66
diff changeset
    24
	$(CC)  digest.o -o digest $(LDFLAGS)
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 66
diff changeset
    25
	$(CC) dump.o -o dump $(LDFLAGS)
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 66
diff changeset
    26
	$(CC) cpuid.o main.o -o cpuid $(LDFLAGS)
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 66
diff changeset
    27
	$(CC) list.o -o list $(LDFLAGS)
6
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