https://github.com/Unipisa/CMM
Raw File
Tip revision: b2be05bf9df919837e45359f90f640bbd6975330 authored by Giuseppe Attardi on 06 June 1996, 09:07:03 UTC
1.6 -
Tip revision: b2be05b
Makefile.dist
#
#  Copyright (C) 1993 Tito Flagella.
#
#  This file is part of the POSSO Customizable Memory Manager (CMM).
#
#  Permission to use, copy, and modify this software and its documentation is
#  hereby granted only under the following terms and conditions.  Both the
#  above copyright notice and this permission notice must appear in all copies
#  of the software, derivative works or modified versions, and any portions
#  thereof, and both notices must appear in supporting documentation.
# 
#  Users of this software agree to the terms and conditions set forth herein,
#  and agree to license at no charge to all parties under these terms and
#  conditions any derivative works or modified versions of this software.
#  
#  This software may be distributed (but not offered for sale or transferred
#  for compensation) to third parties, provided such third parties agree to
#  abide by the terms and conditions of this notice.  
#  
#  THE SOFTWARE IS PROVIDED "AS IS" AND THE COPYRIGHT HOLDERS DISCLAIM ALL
#  WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL THE COPYRIGHT HOLDERS
#  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR
#  ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
#  IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
#  OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
#
#  USER GUIDE
#  The most useful targets in this make file are:
#  "test"  compiles and runs all tests (listed in TESTS) reporting which
#        ones succeeded and which failed.
#  "clean"  removes all object code from this directory.
#  "demo1", "demo2" etc. run various demonstration programs.

CCFLAGS=-O2
CC	= gcc
CCC	= g++

HFILES = machine.h cmm.h

OBJS = 	cmm.o tempheap.o msw.o memory.o

TESTS = test2 test3 test4 test5 test6 test8 testp2 testp3 testp5

all: libCmm.a

test : ${TESTS}
	 @for i in ${TESTS}; do  \
	   ( echo "Running " $$i "..."; \
	     $$i >tests.out 2>&1 ;  \
	   )                    \
	done

demo: demo1 demo2

libCmm.a: $(OBJS)
	ar ru libCmm.a $(OBJS)
	ranlib libCmm.a

cmm.o: cmm.cc $(HFILES)
	$(CC) $(CCFLAGS) -c cmm.cc

memory.o: memory.c $(HFILES)
	$(CC) $(CCFLAGS) -c memory.c

tempheap.o: tempheap.cc tempheap.h $(HFILES)
	$(CC) $(CCFLAGS) -c tempheap.cc

msw.o: msw.cc msw.h $(HFILES)
	$(CC) $(CCFLAGS) -c msw.cc

test2:	test2.cc libCmm.a
	$(CCC) $(CCFLAGS) -o test2 test2.cc libCmm.a
test3:	test3.cc libCmm.a
	$(CCC) $(CCFLAGS) -o test3 test3.cc libCmm.a
test4:	test4.cc libCmm.a
	$(CCC) $(CCFLAGS) -o test4 test4.cc libCmm.a 
test5:	test5.cc libCmm.a
	$(CCC) $(CCFLAGS) -o test5 test5.cc libCmm.a 
test6:	test6.cc libCmm.a
	$(CCC) $(CCFLAGS) -o test6 test6.cc libCmm.a 
test8:	test8.cc libCmm.a
	$(CCC) $(CCFLAGS) -o test8 test8.cc libCmm.a 
testp2: testp2.c libCmm.a
	${CC} ${CFLAGS} -g -o testp2 testp2.c libCmm.a
testp3: testp3.c libCmm.a
	${CC} ${CFLAGS} -g -o testp3 testp3.c libCmm.a
testp5: testp5.cc libCmm.a
	${CXX} ${OPTS} -o testp5 ${CCFLAGS} testp5.cc libCmm.a
demo1:	demo1.cc libCmm.a
	$(CCC) $(CCFLAGS) -o demo1 demo1.cc libCmm.a 
demo2:	demo2.cc libCmm.a 
	$(CCC) $(CCFLAGS) -o demo2 demo2.cc libCmm.a 

clean:
	/bin/rm -rf *.o $(TESTS) libCmm.a
back to top