########################################################################### # # Filename: # # Makefile # # Description: # # Makefile to build and run the demonstration program # # There are five targets in this Makefile: # all - compile all the source files # run - execute the demo (on the simulator) # clean - delete derived files # depend - update the dependencies # dist - create a distribution file # # ChaangeLog: # # $Log: Makefile,v $ # ########################################################################### version = 1.2 all: tcdemop SRCS = tcdemop.cpp term-erc.cpp tcu.cpp thread.cpp telemetry.cpp reader.cpp buffer.cpp OBJS = tcdemop.o term-erc.o tcu.o thread.o telemetry.o reader.o buffer.o CXX = erc-coff-gcc CC = erc-coff-gcc CFLAGS = -O2 -g CXXFLAGS = -O2 -g RUN = erc-coff-run .SUFFIXES: .cpp .cpp.o : $(CXX) $(CXXFLAGS) -c $< -o $@ tcdemop: ${OBJS} $(CXX) -O2 ${OBJS} -o tcdemop -lpthread -Wl,-Map=tcdemop.map run: tcdemop $(RUN) tcdemop clean: rm -rf *.o a.out *.gz *~ *.map rm -rf tcdemop dist: rm -rf tcdemop-$(version) mkdir tcdemop-$(version) cp *.cpp tcdemop-$(version) cp *.h tcdemop-$(version) cp Makefile tcdemop-$(version) cp README tcdemop-$(version) tar zcf tcdemop-$(version).tar.gz tcdemop-$(version) rm -rf tcdemop-$(version) depend: makedepend -Y $(CFLAGS) $(SRCS) # DO NOT DELETE tcdemop.o: thread.h tcu.h mutex.h telemetry.h reader.h buffer.h cond.h term.h term-erc.o: term.h thread.h buffer.h mutex.h cond.h tcu.o: tcu.h thread.h mutex.h thread.o: thread.h telemetry.o: tcu.h thread.h mutex.h telemetry.h reader.h buffer.h cond.h reader.o: reader.h thread.h mutex.h buffer.h cond.h tcu.h buffer.o: buffer.h mutex.h cond.h thread.h