Makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. ############################################################################
  2. # audio/Makefile
  3. #
  4. # Licensed to the Apache Software Foundation (ASF) under one or more
  5. # contributor license agreements. See the NOTICE file distributed with
  6. # this work for additional information regarding copyright ownership. The
  7. # ASF licenses this file to you under the Apache License, Version 2.0 (the
  8. # "License"); you may not use this file except in compliance with the
  9. # License. You may obtain a copy of the License at
  10. #
  11. # http://www.apache.org/licenses/LICENSE-2.0
  12. #
  13. # Unless required by applicable law or agreed to in writing, software
  14. # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  15. # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  16. # License for the specific language governing permissions and limitations
  17. # under the License.
  18. #
  19. ############################################################################
  20. include $(TOPDIR)/Make.defs
  21. CSRCS = audio.c
  22. ifeq ($(CONFIG_AUDIO_COMP),y)
  23. CSRCS += audio_comp.c
  24. endif
  25. # Include support for various drivers. Each Make.defs file will add its
  26. # files to the source file list, add its DEPPATH info, and will add
  27. # the appropriate paths to the VPATH variable
  28. ifeq ($(CONFIG_AUDIO_FORMAT_PCM),y)
  29. CSRCS += pcm_decode.c
  30. endif
  31. AOBJS = $(ASRCS:.S=$(OBJEXT))
  32. COBJS = $(CSRCS:.c=$(OBJEXT))
  33. SRCS = $(ASRCS) $(CSRCS)
  34. OBJS = $(AOBJS) $(COBJS)
  35. BIN = libaudio$(LIBEXT)
  36. all: $(BIN)
  37. .PHONY: depend clean distclean
  38. $(AOBJS): %$(OBJEXT): %.S
  39. $(call ASSEMBLE, $<, $@)
  40. $(COBJS): %$(OBJEXT): %.c
  41. $(call COMPILE, $<, $@)
  42. $(BIN): $(OBJS)
  43. $(call ARCHIVE, $@, $(OBJS))
  44. makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds)
  45. $(call CATFILE, Make.dep, $^)
  46. $(call DELFILE, $^)
  47. .depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
  48. $(Q) $(MAKE) makedepfile
  49. $(Q) touch $@
  50. depend: .depend
  51. clean:
  52. $(call DELFILE, $(BIN))
  53. $(call CLEAN)
  54. distclean: clean
  55. $(call DELFILE, Make.dep)
  56. $(call DELFILE, .depend)
  57. -include Make.dep