lsflib/tools/Makefile
author Markus Bröker <mbroeker@largo.dyndns.tv>
Thu, 16 Apr 2009 12:49:13 +0200
changeset 65 76514757b0d6
parent 6 c3dc3eb3b541
child 66 2b4f786d9073
permissions -rw-r--r--
GNU Indent cannot handle C++ Source Files... I like GNU indent. I like it so much that i use it for all my projects. But it doesn't work with C++ sources. To avoid further problems, all C++ Headers will be renamed from *.h to their *.hpp counterparts. mbroeker committer: Markus Bröker <mbroeker@largo.homelinux.org>

CC		= gcc
CPP		= g++
STRIP		= strip -s
INSTALL		= cp -f
RM		= rm -f
CFLAGS		= -Wall -Wstrict-prototypes 
INCLUDE		= -I/usr/local/include
LDFLAGS		= -L/usr/local/lib/ -llsf -Wl,--rpath,lib

TARGET		= progs

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

all: progs

progs: cpuid.o main.o digest.o dump.o list.o
	$(CC) $(LDFLAGS) digest.o -o digest
	$(CC) $(LDFLAGS) dump.o -o dump
	$(CC) $(LDFLAGS) cpuid.o main.o -o cpuid
	$(CC) $(LDFLAGS) list.o -o list

	$(STRIP) digest
	$(STRIP) cpuid
	$(STRIP) dump
	$(STRIP) list

.PHONY: clean distclean

clean: 
	$(RM) *.o
	$(RM) *~
	$(RM) digest cpuid dump list

distclean: 
	@make clean

install: progs
	$(INSTALL) digest $(HOME)/bin/
	$(INSTALL) cpuid $(HOME)/bin/
	$(INSTALL) dump $(HOME)/bin/
	$(INSTALL) list $(HOME)/bin/

uninstall: 
	$(RM) $(HOME)/bin/digest
	$(RM) $(HOME)/bin/list
	$(RM) $(HOME)/bin/cpuid
	$(RM) $(HOME)/bin/dump