Makefile.dj
上传用户:wstnjxml
上传日期:2014-04-03
资源大小:7248k
文件大小:5k
源码类别:

Windows CE

开发平台:

C/C++

  1. #------------------------------------------------------------------------------#
  2. # This is the Makefile for building libMikMod using GNU Make and GNU C compiler
  3. # You will need the following tools to do it painlessly:
  4. # - (P)GCC/DJGPP package
  5. # - GNU Make
  6. # - GNU grep
  7. # - GNU sed
  8. #------------------------------------------------------------------------------#
  9. # Targets:
  10. # - all (default): make libmikmod.a, static MikMod sound library
  11. # - clean: clean up (remove all generated files)
  12. # - depend: rebuild dependencies (at the end of this makefile)
  13. #    You should have makedep tool from Crystal Space project installed.
  14. #------------------------------------------------------------------------------#
  15. # Set to 1 for debug build
  16. DEBUG = 0
  17. # The tools
  18. CC = gcc -c
  19. CFLAGS = -DHAVE_CONFIG_H $(INCLUDE)
  20. INCLUDE = -Iinclude -I../include -I../playercode
  21. AR = ar
  22. ARFLAGS = cr
  23. ifeq ($(DEBUG),1)
  24. CFLAGS += -g -Wall
  25. else
  26. CFLAGS += -s -O3 -Wall -fomit-frame-pointer -ffast-math -funroll-loops
  27. endif
  28. # Directory layout
  29. SRCPATH = ../loaders ../mmio ../playercode
  30. OUT = out
  31. # MikMod drivers
  32. DRIVERS = drv_ultra drv_sb drv_wss drv_wav drv_raw drv_stdout drv_pipe drv_nos
  33. # SED script to update configuration files
  34. SED_CONFIG = 
  35.   -e s/@LIBMIKMOD_MAJOR_VERSION@/$(LIBMIKMOD_MAJOR_VERSION)/ 
  36.   -e s/@LIBMIKMOD_MINOR_VERSION@/$(LIBMIKMOD_MINOR_VERSION)/ 
  37.   -e s/@LIBMIKMOD_MICRO_VERSION@/$(LIBMIKMOD_MICRO_VERSION)/ 
  38.   -e s/@DOES_NOT_HAVE_SIGNED@//
  39. vpath %.c $(SRCPATH) ../drivers src
  40. # Build rules
  41. $(OUT)/%.o: %.c
  42. $(CC) $(CFLAGS) -o $@ $<
  43. SRC = $(filter-out %mixer_core.c,$(wildcard $(addsuffix /*.c,$(SRCPATH)) 
  44.   $(addsuffix .c,$(addprefix ../drivers/,$(DRIVERS))))) 
  45.   src/dosgus.c src/dossb.c src/doswss.c src/dosdma.c src/dosirq.c
  46. OBJ = $(addprefix $(OUT)/,$(notdir $(SRC:.c=.o)))
  47. # The build targets
  48. TARGETS = $(OUT) include/mikmod.h include/mikmod_build.h libmikmod.a
  49. all: $(TARGETS)
  50. clean:
  51. rm -rf $(TARGETS)
  52. depend: $(SRC)
  53. makedep -DHAVE_CONFIG_H -D__DJGPP__ $(INCLUDE) -r -p$(OUT)/ $^
  54. $(OUT):
  55. mkdir $@
  56. libmikmod.a: $(OBJ)
  57. $(AR) $(ARFLAGS) $@ $^
  58. version.mak: ../configure.in
  59. grep "LIBMIKMOD_.*_VERSION=" $< >$@
  60. include/mikmod.h include/mikmod_build.h: ../include/mikmod_h.in
  61. sed $(SED_CONFIG) $< >$@
  62. -include version.mak
  63. # DO NOT DELETE this line - makedep depends on it
  64. out/load_669.o: include/config.h ../include/mikmod_internals.h
  65. out/load_amf.o: include/config.h ../include/mikmod_internals.h
  66. out/load_asy.o: include/config.h ../include/mikmod_internals.h
  67. out/load_dsm.o: include/config.h ../include/mikmod_internals.h
  68. out/load_far.o: include/config.h ../include/mikmod_internals.h
  69. out/load_gdm.o: include/config.h ../include/mikmod_internals.h
  70. out/load_imf.o: include/config.h ../include/mikmod_internals.h
  71. out/load_it.o: include/config.h ../include/mikmod_internals.h
  72. out/load_m15.o: include/config.h ../include/mikmod_internals.h
  73. out/load_med.o: include/config.h ../include/mikmod_internals.h
  74. out/load_mod.o: include/config.h ../include/mikmod_internals.h
  75. out/load_mtm.o: include/config.h ../include/mikmod_internals.h
  76. out/load_s3m.o: include/config.h ../include/mikmod_internals.h
  77. out/load_stm.o: include/config.h ../include/mikmod_internals.h
  78. out/load_stx.o: include/config.h ../include/mikmod_internals.h
  79. out/load_ult.o: include/config.h ../include/mikmod_internals.h
  80. out/load_uni.o: include/config.h ../include/mikmod_internals.h
  81. out/load_xm.o: include/config.h ../include/mikmod_internals.h
  82. out/mdreg.o: include/config.h ../include/mikmod_internals.h
  83. out/mdriver.o: include/config.h ../include/mikmod_internals.h
  84. out/mixer.o: include/config.h ../include/mikmod_internals.h 
  85.   ../playercode/mixer_core.c ../playercode/mixer_core.h
  86. out/mloader.o: include/config.h ../include/mikmod_internals.h
  87. out/mlreg.o: include/config.h ../include/mikmod_internals.h
  88. out/mlutil.o: include/config.h ../include/mikmod_internals.h
  89. out/mmalloc.o: include/config.h ../include/mikmod_internals.h
  90. out/mmerror.o: include/config.h ../include/mikmod_internals.h
  91. out/mmio.o: include/config.h ../include/mikmod_internals.h
  92. out/mplayer.o: include/config.h ../include/mikmod_internals.h
  93. out/munitrk.o: include/config.h ../include/mikmod_internals.h
  94. out/mwav.o: include/config.h ../include/mikmod_internals.h
  95. out/npertab.o: include/config.h ../include/mikmod_internals.h
  96. out/sloader.o: include/config.h ../include/mikmod_internals.h
  97. out/drv_ultra.o: include/config.h ../include/mikmod_internals.h
  98. out/drv_sb.o: include/config.h ../include/mikmod_internals.h include/dossb.h 
  99.   include/dosdma.h include/dosirq.h
  100. out/drv_wss.o: include/config.h ../include/mikmod_internals.h 
  101.   include/doswss.h include/dosdma.h include/dosirq.h
  102. out/drv_wav.o: include/config.h ../include/mikmod_internals.h
  103. out/drv_raw.o: include/config.h ../include/mikmod_internals.h
  104. out/drv_stdout.o: include/config.h ../include/mikmod_internals.h
  105. out/drv_pipe.o: include/config.h ../include/mikmod_internals.h
  106. out/drv_nos.o: include/config.h ../include/mikmod_internals.h
  107. out/dosgus.o: include/dosgus.h include/dosdma.h include/dosirq.h
  108. out/dossb.o: include/dossb.h include/dosdma.h include/dosirq.h
  109. out/doswss.o: include/doswss.h include/dosdma.h include/dosirq.h
  110. out/dosdma.o: include/dosdma.h
  111. out/dosirq.o: include/dosirq.h