Makefile.linux 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Make PortAudio for Linux
  2. # Updated 2001/08/25 Bill Eldridge bill@rfa.org
  3. # Updated 2001/10/16, philburk@softsynth.com, s/unix_oss/unix_oss/
  4. # Updated 2002/04/30 Bill Eldridge bill@rfa.org
  5. # Made the libinstall and tests compile a bit cleaner
  6. # A pretty bare makefile, that figures out all the test files
  7. # and compiles them against the library in the pa_unix_oss directory.
  8. # Do "make all" and then when happy, "make libinstall"
  9. # (if not happy, "make clean")
  10. # The ldconfig stuff in libinstall is the wrong way to do it -
  11. # someone tell me the right way, please
  12. LIBS = -lm -lpthread
  13. CDEFINES = -I../pa_common
  14. CFLAGS = -g
  15. LIBINST = /usr/local/lib
  16. TESTS:= $(wildcard pa_tests/pa*.c pa_tests/debug*.c)
  17. TESTO:= $(wildcard pa_tests/pa*.o pa_tests/debug*.o)
  18. LIBFILES:= ./pa_common/pa_lib.c ./pa_unix_oss/pa_unix_oss.c ./pa_unix_oss/pa_unix.c
  19. #all: sharedlib libinstall tests
  20. all: sharedlib libinstall testo testq
  21. .c.o:
  22. -gcc $(CFLAGS) -c -I./pa_common $< -o $*.o
  23. .o:
  24. -gcc $*.o -o $* -Lpa_unix_oss -lportaudio $(LIBS)
  25. #.c.o:
  26. # -gcc -c -I./pa_common $< -o $*.o
  27. # -gcc $*.o -o $* -Lpa_unix_oss $(LIBS) -lportaudio
  28. sharedlib: $(LIBFILES:.c=.o)
  29. gcc -shared -o ./pa_unix_oss/libportaudio.so ./pa_common/pa_lib.o ./pa_unix_oss/pa_unix_oss.o ./pa_unix_oss/pa_unix.o
  30. libinstall: ./pa_unix_oss/libportaudio.so
  31. @cp -f ./pa_unix_oss/libportaudio.so $(LIBINST)
  32. @/sbin/ldconfig
  33. testo: $(TESTS:.c=.o)
  34. testq: $(TESTO:.o=)
  35. clean:
  36. -@rm -f $(TESTS:.c=.o)
  37. -@rm -f $(TESTS:.c=)
  38. -@rm -f $(LIBFILES:.c=.o)
  39. -@rm -f ./pa_unix_oss/libportaudio.so
粤ICP备19079148号