#############################################################################
# Makefile for building ../lib/libmd5.a
# Generated by tmake at 13:14, 2011/08/14
#     Project: libmd5
#    Template: lib
#############################################################################

####### Compiler, tools and options

CC	=	cc
CXX	=	c++
CFLAGS	=	-pipe -Wall -W -g -fstack-protector
CXXFLAGS=	-pipe -D__FreeBSD__=6 -Wall -W -g -fstack-protector
INCPATH	=	
AR	=	ar cq
RANLIB	=	ranlib
MOC	=	/usr/bin/moc

TAR	=	tar -cf
GZIP	=	gzip -9f

####### Files

HEADERS =	md5.h \
		md5_loc.h
SOURCES =	md5.c
OBJECTS =	../objects/md5.o
SRCMOC	=	
OBJMOC	=	
DIST	=	
TARGET	=	../lib/libmd5.a

####### Implicit rules

.SUFFIXES: .cpp .cxx .cc .C .c

.cpp.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cxx.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cc.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.C.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

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

####### Build rules

all: $(TARGET)

staticlib: $(TARGET)

$(TARGET): $(OBJECTS) $(OBJMOC) 
	-rm -f $(TARGET)
	$(AR) $(TARGET) $(OBJECTS) $(OBJMOC)
	ranlib $(TARGET)

moc: $(SRCMOC)

tmake:
	tmake libmd5.pro

dist:
	$(TAR) libmd5.tar libmd5.pro $(SOURCES) $(HEADERS) $(DIST)
	$(GZIP) libmd5.tar

clean:
	-rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(TARGET)
	-rm -f *~ core

####### Compile

../objects/md5.o: md5.c \
		md5.h \
		md5_loc.h
	$(CC) -c $(CFLAGS) $(INCPATH) -o ../objects/md5.o md5.c

