# $Id: Makefile,v 1.1 2003/04/15 03:37:42 cher Exp $ # Copyright (C) 2003 Alexander Chernov # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # See the `COPYING' file for the full terms and conditions. CFILES = t1.c CXXFILES = t2.cpp LIBRANDOM=.. LIBRANDOM_INC=${LIBRANDOM}/include LIBRANDOM_LIB=${LIBRANDOM}/lib CC=gcc CXX=g++ CFLAGS=-Wall -O2 -I${LIBRANDOM_INC} CXXFLAGS=-Wall -O2 -I${LIBRANDOM_INC} -fno-rtti LDLIBS=-lrandom -lm LDFLAGS=-s -L${LIBRANDOM_LIB} -Wl,-rpath,${LIBRANDOM_LIB} OFILES = ${CFILES:.c=.o} ${CXXFILES:.cpp=.o} XFILES = ${CFILES:.c=} ${CXXFILES:.cpp=} all: ${OFILES} ${XFILES} clean: -rm -f *.o ${XFILES} %.o : %.cpp ${CXX} ${CXXFLAGS} $< -c -o $@ %.o : %.c ${CC} ${CFLAGS} $< -c -o $@ % : %.o ${CXX} ${LDFLAGS} $^ -o $@ ${LDLIBS}