lsflib/tools/Makefile
changeset 66 2b4f786d9073
parent 6 c3dc3eb3b541
child 166 ecd6492274ad
equal deleted inserted replaced
65:76514757b0d6 66:2b4f786d9073
     1 CC		= gcc
     1       CC = gcc
     2 CPP		= g++
     2      CPP = g++
     3 STRIP		= strip -s
     3    STRIP = strip -s
     4 INSTALL		= cp -f
     4  INSTALL = cp -f
     5 RM		= rm -f
     5       RM = rm -f
     6 CFLAGS		= -Wall -Wstrict-prototypes 
     6   CFLAGS = -Wall -Wstrict-prototypes
     7 INCLUDE		= -I/usr/local/include
     7  INCLUDE = -I/usr/local/include
     8 LDFLAGS		= -L/usr/local/lib/ -llsf -Wl,--rpath,lib
     8  LDFLAGS = -L/usr/local/lib/ -llsf -Wl,--rpath,lib
     9 
     9 
    10 TARGET		= progs
    10 OBJECTS  = cpuid.o
       
    11 OBJECTS += main.o
       
    12 OBJECTS += digest.o
       
    13 OBJECTS += dump.o
       
    14 OBJECTS += list.o
       
    15 
       
    16 TARGET = progs
    11 
    17 
    12 .c.o:
    18 .c.o:
    13 	$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $<
    19 	$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $<
    14 
    20 
    15 all: progs
    21 all: progs
    16 
    22 
    17 progs: cpuid.o main.o digest.o dump.o list.o
    23 progs: $(OBJECTS)
    18 	$(CC) $(LDFLAGS) digest.o -o digest
    24 	$(CC) $(LDFLAGS) digest.o -o digest
    19 	$(CC) $(LDFLAGS) dump.o -o dump
    25 	$(CC) $(LDFLAGS) dump.o -o dump
    20 	$(CC) $(LDFLAGS) cpuid.o main.o -o cpuid
    26 	$(CC) $(LDFLAGS) cpuid.o main.o -o cpuid
    21 	$(CC) $(LDFLAGS) list.o -o list
    27 	$(CC) $(LDFLAGS) list.o -o list
    22 
    28 
    25 	$(STRIP) dump
    31 	$(STRIP) dump
    26 	$(STRIP) list
    32 	$(STRIP) list
    27 
    33 
    28 .PHONY: clean distclean
    34 .PHONY: clean distclean
    29 
    35 
    30 clean: 
    36 clean:
    31 	$(RM) *.o
    37 	$(RM) *.o
    32 	$(RM) *~
    38 	$(RM) *~
    33 	$(RM) digest cpuid dump list
    39 	$(RM) digest cpuid dump list
    34 
    40 
    35 distclean: 
    41 distclean:
    36 	@make clean
    42 	@make clean
    37 
    43 
    38 install: progs
    44 install: progs
    39 	$(INSTALL) digest $(HOME)/bin/
    45 	$(INSTALL) digest $(HOME)/bin/
    40 	$(INSTALL) cpuid $(HOME)/bin/
    46 	$(INSTALL) cpuid $(HOME)/bin/
    41 	$(INSTALL) dump $(HOME)/bin/
    47 	$(INSTALL) dump $(HOME)/bin/
    42 	$(INSTALL) list $(HOME)/bin/
    48 	$(INSTALL) list $(HOME)/bin/
    43 
    49 
    44 uninstall: 
    50 uninstall:
    45 	$(RM) $(HOME)/bin/digest
    51 	$(RM) $(HOME)/bin/digest
    46 	$(RM) $(HOME)/bin/list
    52 	$(RM) $(HOME)/bin/list
    47 	$(RM) $(HOME)/bin/cpuid
    53 	$(RM) $(HOME)/bin/cpuid
    48 	$(RM) $(HOME)/bin/dump
    54 	$(RM) $(HOME)/bin/dump
    49