home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2003 March / VPR0303A.ISO / AIBO / MoNet / MotionAgents / Makefile next >
Makefile  |  2002-12-19  |  2KB  |  67 lines

  1. #
  2. # Copyright 2002 Sony Corporation 
  3. #
  4. # Permission to use, copy, modify, and redistribute this software for
  5. # non-commercial use is hereby granted.
  6. #
  7. # This software is provided "as is" without warranty of any kind,
  8. # either expressed or implied, including but not limited to the
  9. # implied warranties of fitness for a particular purpose.
  10. #
  11.  
  12. PREFIX=/usr/local/OPEN_R_SDK
  13. INSTALLDIR=../MS
  14. CXX=$(PREFIX)/bin/mipsel-linux-g++
  15. STRIP=$(PREFIX)/bin/mipsel-linux-strip
  16. MKBIN=$(PREFIX)/OPEN_R/bin/mkbin
  17. STUBGEN=$(PREFIX)/OPEN_R/bin/stubgen2
  18. MKBINFLAGS=-p $(PREFIX)
  19. LIBS=-L$(PREFIX)/OPEN_R/lib -lObjectComm -lOPENR
  20. LIBODADIR=../common/libODA
  21. LIBODA=$(LIBODADIR)/libODA.a
  22. LIBMTNDIR=../common/libMTN
  23. LIBMTN=$(LIBMTNDIR)/libMTN.a
  24. CXXFLAGS= \
  25.     -O2 \
  26.     -g \
  27.     -I. \
  28.     -I$(PREFIX)/OPEN_R/include/R4000 \
  29.     -I$(PREFIX)/OPEN_R/include \
  30.     -I../common/include
  31.  
  32. #
  33. # When OPENR_DEBUG is defined, OSYSDEBUG() is available.
  34. #
  35. #CXXFLAGS+= -DOPENR_DEBUG
  36.  
  37. .PHONY: all install clean
  38.  
  39. all: motionAgents.bin 
  40.  
  41. %.o: %.cc
  42.     $(CXX) $(CXXFLAGS) -o $@ -c $^
  43.  
  44. MotionAgentsStub.cc: stub.cfg
  45.     $(STUBGEN) stub.cfg    
  46.  
  47. $(LIBODA):
  48.     (cd $(LIBODADIR); make)    
  49.  
  50. $(LIBMTN):
  51.     (cd $(LIBMTNDIR); make)    
  52.  
  53. motionAgents.bin: MotionAgentsStub.o MotionAgents.o MoNetAgentManager.o MoNetAgent.o NeutralAgent.o MTNAgent.o $(LIBODA) $(LIBMTN) motionAgents.ocf
  54.     $(MKBIN) $(MKBINFLAGS) -o $@ $^ $(LIBS)
  55.     $(STRIP) $@
  56.  
  57. install: motionAgents.bin
  58.     gzip -c motionAgents.bin > $(INSTALLDIR)/OPEN-R/MW/OBJS/MTNAGTS.BIN
  59.  
  60. clean:
  61.     (cd $(LIBODADIR); make clean)
  62.     (cd $(LIBMTNDIR); make clean)
  63.     rm -f *.o *.bin *.elf *.snap.cc
  64.     rm -f MotionAgentsStub.h MotionAgentsStub.cc def.h entry.h
  65.     rm -f $(INSTALLDIR)/OPEN-R/MW/OBJS/MTNAGT.BIN
  66.  
  67.