home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2003 March / VPR0303A.ISO / AIBO / MoNet / SoundAgent / Makefile next >
Makefile  |  2002-12-19  |  1KB  |  60 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. CXXFLAGS= \
  23.     -O2 \
  24.     -g \
  25.     -I. \
  26.     -I$(PREFIX)/OPEN_R/include/R4000 \
  27.     -I$(PREFIX)/OPEN_R/include \
  28.     -I../common/include
  29.  
  30. #
  31. # When OPENR_DEBUG is defined, OSYSDEBUG() is available.
  32. #
  33. #CXXFLAGS+= -DOPENR_DEBUG
  34.  
  35. .PHONY: all install clean
  36.  
  37. all: soundAgent.bin
  38.  
  39. %.o: %.cc
  40.     $(CXX) $(CXXFLAGS) -o $@ -c $^
  41.  
  42. SoundAgentStub.cc: stub.cfg
  43.     $(STUBGEN) stub.cfg    
  44.  
  45. $(LIBODA):
  46.     (cd $(LIBODADIR); make)    
  47.  
  48. soundAgent.bin: SoundAgentStub.o SoundAgent.o WAV.o $(LIBODA) soundAgent.ocf
  49.     $(MKBIN) $(MKBINFLAGS) -o $@ $^ $(LIBS)
  50.     $(STRIP) $@
  51.  
  52. install: soundAgent.bin
  53.     gzip -c soundAgent.bin > $(INSTALLDIR)/OPEN-R/MW/OBJS/SOUNDAGT.BIN
  54.  
  55. clean:
  56.     (cd $(LIBODADIR); make clean)
  57.     rm -f *.o *.bin *.elf *.snap.cc
  58.     rm -f SoundAgentStub.h SoundAgentStub.cc def.h entry.h
  59.     rm -f $(INSTALLDIR)/OPEN-R/MW/OBJS/SOUNDAGT.BIN
  60.