Changeset 100 for trunk/libjdkmidi/trunk
- Timestamp:
- 09/07/06 16:46:53 (2 years ago)
- Files:
-
- 1 modified
-
trunk/libjdkmidi/trunk/magic.mak (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/libjdkmidi/trunk/magic.mak
r99 r100 11 11 12 12 13 # this first target, 'everything' is a placeholder which makes the required subdirectories and then14 # calls make again with the required directories made. Since these subdirectories are part of the15 # search paths, make must see them when invoked otherwise it gets confused.16 17 .PHONY : everything18 19 ifeq ($(CROSS_COMPILING),1)20 everything : native_dirs dirs21 @$(MAKE) all22 else23 everything : dirs24 @$(MAKE) all25 endif26 27 28 13 # default project settings. These are usually originally set in project.mak 29 14 … … 228 213 # all source files in a specified directory class and construct the o file lists for them. 229 214 # Param $(1) is the class of program in capitals, for example TOOLS, TESTS, EXAMPLES, GUI 230 # Param $(2) is the lowercase directory name that these source files live in. $(2) is also231 # used as the make target for the exe files in this class.232 215 # the text returned by this function is then to be eval'd. The appropriate lists of 233 216 # source files and O files for this class are then created dynamically. 234 217 235 218 define search_program_group 236 LIB_$(1)_DIR+=$$(call target_suffix_platform_dirs,$(2))237 238 239 219 LIB_$(1)_CPP_FILES=$$(call get_file_list,$$(LIB_$(1)_DIR),cpp) 240 220 LIB_$(1)_CC_FILES=$$(call get_file_list,$$(LIB_$(1)_DIR),cc) … … 251 231 LIB_$(1)_EXE_FILES=$$(addprefix $$(OUTPUT_$(1)_DIR)/,$$(notdir $$(LIB_$(1)_O_FILES:.o=$$(EXE)))) 252 232 253 OUTPUT_$(1)_DIR?=$$(OUTPUT_DIR)/$(2) 254 255 ALL_OUTPUT_DIRS+=$$(OUTPUT_DIR)/$(2) 256 257 .PHONY : $(2) 258 259 $(2) : lib $$(LIB_$(1)_EXE_FILES) config-tool 260 261 $$(LIB_$(1)_EXE_FILES) : $$(OUTPUT_LIB) 262 263 ifeq ($(CROSS_COMPILING),1) 264 265 NATIVE_LIB_$(1)_DIR+=$$(call native_suffix_platform_dirs,$(2)) 266 233 ifeq ($(CROSS_COMPILING),1) 267 234 NATIVE_LIB_$(1)_CPP_FILES=$$(call get_file_list,$$(NATIVE_LIB_$(1)_DIR),cpp) 268 235 NATIVE_LIB_$(1)_CC_FILES=$$(call get_file_list,$$(NATIVE_LIB_$(1)_DIR),cc) … … 271 238 NATIVE_LIB_$(1)_SH_FILES=$$(call get_file_list,$$(NATIVE_LIB_$(1)_DIR),sh) 272 239 273 NATIVE_LIB_ $(1)_O_FILES=$$(call get_native_cpp_o_files,$$(NATIVE_LIB_$(1)_CPP_FILES)) \240 NATIVE_LIB_TOOLS_O_FILES=$$(call get_native_cpp_o_files,$$(NATIVE_LIB_$(1)_CPP_FILES)) \ 274 241 $$(call get_native_cc_o_files,$$(NATIVE_LIB_$(1)_CC_FILES)) \ 275 242 $$(call get_native_c_o_files,$$(NATIVE_LIB_$(1)_C_FILES)) \ … … 278 245 279 246 NATIVE_LIB_$(1)_EXE_FILES=$$(addprefix $$(NATIVE_OUTPUT_$(1)_DIR)/,$$(notdir $$(NATIVE_LIB_$(1)_O_FILES:.o=$$(NATIVE_EXE)))) 280 281 NATIVE_OUTPUT_$(1)_DIR?=$$(NATIVE_OUTPUT_DIR)/$(2) 282 283 NATIVE_ALL_OUTPUT_DIRS+=$$(NATIVE_OUTPUT_DIR)/$(2) 284 285 .PHONY : native_$(1) 286 287 native-$(2) : native-lib $$(NATIVE_LIB_$(1)_EXE_FILES) 288 289 $$(NATIVE_LIB_$(1)_EXE_FILES) : $(NATIVE_OUTPUT_LIB) 290 endif 291 292 247 endif 293 248 endef 294 249 … … 457 412 LIB_INCLUDE_DIR+=$(call target_suffix_platform_dirs,include) 458 413 LIB_SRC_DIR+=$(call target_suffix_platform_dirs,src) 414 LIB_TESTS_DIR+=$(call target_suffix_platform_dirs,tests) 415 LIB_GUI_DIR+=$(call target_suffix_platform_dirs,gui) 416 LIB_EXAMPLES_DIR+=$(call target_suffix_platform_dirs,examples) 417 LIB_TOOLS_DIR+=$(call target_suffix_platform_dirs,tools) 459 418 LIB_DOCS_DIR+=$(call target_suffix_platform_dirs,docs) 460 419 … … 462 421 OUTPUT_DIR=$(BUILD_DIR)/build 463 422 OUTPUT_LIB_DIR?=$(OUTPUT_DIR)/lib 423 OUTPUT_TESTS_DIR?=$(OUTPUT_DIR)/tests 464 424 OUTPUT_DOCS_DIR?=$(OUTPUT_DIR)/docs 425 OUTPUT_TOOLS_DIR?=$(OUTPUT_DIR)/tools 426 OUTPUT_GUI_DIR?=$(OUTPUT_DIR)/gui 427 OUTPUT_EXAMPLES_DIR?=$(OUTPUT_DIR)/examples 465 428 OUTPUT_OBJ_DIR?=$(OUTPUT_DIR)/obj 466 429 … … 476 439 INSTALL_DOCS_DIR?=$(INSTALL_DIR)/share/$(PROJECT)-$(PROJECT_VERSION) 477 440 478 ALL_OUTPUT_DIRS+=$(OUTPUT_LIB_DIR) $(OUTPUT_DOCS_DIR) $OUTPUT_OBJ_DIR) 441 ALL_OUTPUT_DIRS+=$(OUTPUT_LIB_DIR) $(OUTPUT_TOOLS_DIR) $(OUTPUT_TESTS_DIR) $(OUTPUT_DOCS_DIR) $(OUTPUT_EXAMPLES_DIR) $(OUTPUT_OBJ_DIR) $(OUTPUT_GUI_DIR) 442 443 479 444 480 445 NATIVE_USE_AR?=1 … … 551 516 # calculate our output directories for our native platform results 552 517 553 NATIVE_LIB_SRC_DIR+=$(call native_suffix_platform_dirs,src)554 555 518 NATIVE_OUTPUT_DIR=$(NATIVE_BUILD_DIR)/native 556 519 NATIVE_OUTPUT_LIB_DIR?=$(NATIVE_OUTPUT_DIR)/lib 520 NATIVE_OUTPUT_TESTS_DIR?=$(NATIVE_OUTPUT_DIR)/tests 557 521 NATIVE_OUTPUT_DOCS_DIR?=$(NATIVE_OUTPUT_DIR)/docs 522 NATIVE_OUTPUT_TOOLS_DIR?=$(NATIVE_OUTPUT_DIR)/tools 523 NATIVE_OUTPUT_EXAMPLES_DIR?=$(NATIVE_OUTPUT_DIR)/examples 558 524 NATIVE_OUTPUT_OBJ_DIR?=$(NATIVE_OUTPUT_DIR)/obj 559 525 560 526 NATIVE_OUTPUT_LIB?=$(NATIVE_OUTPUT_LIB_DIR)/lib$(PROJECT).a 561 527 562 NATIVE_ALL_OUTPUT_DIRS+=$(NATIVE_OUTPUT_LIB_DIR) $(NATIVE_OUTPUT_DOCS_DIR) $(NATIVE_OUTPUT_OBJ_DIR) 528 529 NATIVE_LIB_SRC_DIR+=$(call native_suffix_platform_dirs,tests) 530 NATIVE_LIB_TESTS_DIR+=$(call native_suffix_platform_dirs,tests) 531 NATIVE_LIB_GUI_DIR+=$(call native_suffix_platform_dirs,gui) 532 NATIVE_LIB_EXAMPLES_DIR+=$(call native_suffix_platform_dirs,examples) 533 NATIVE_LIB_TOOLS_DIR+=$(call native_suffix_platform_dirs,tools) 534 535 536 NATIVE_ALL_OUTPUT_DIRS+=$(NATIVE_OUTPUT_LIB_DIR) $(NATIVE_OUTPUT_TOOLS_DIR) $(NATIVE_OUTPUT_TESTS_DIR) $(NATIVE_OUTPUT_DOCS_DIR) $(NATIVE_OUTPUT_EXAMPLES_DIR) $(NATIVE_OUTPUT_OBJ_DIR) 563 537 564 538 … … 572 546 vpath %.o $(OUTPUT_OBJ_DIR) 573 547 574 # all source files in all of our src,tests,e xamples,tools,gui dirs548 # all source files in all of our src,tests,ecxamples,tools,gui dirs 575 549 vpath %.m $(LIB_SRC_DIR) $(LIB_TESTS_DIR) $(LIB_EXAMPLES_DIR) $(LIB_TOOLS_DIR) $(LIB_GUI_DIR) 576 550 vpath %.mm $(LIB_SRC_DIR) $(LIB_TESTS_DIR) $(LIB_EXAMPLES_DIR) $(LIB_TOOLS_DIR) $(LIB_GUI_DIR) … … 778 752 # get the list of tool program source files from the tools directories 779 753 780 $(eval $(call search_program_group,TOOLS ,tools))754 $(eval $(call search_program_group,TOOLS)) 781 755 782 756 # get the list of test program source files from the tests directories 783 757 784 $(eval $(call search_program_group,TESTS ,tests))758 $(eval $(call search_program_group,TESTS)) 785 759 786 760 # get the list of example program source files from the examples directories 787 761 788 $(eval $(call search_program_group,EXAMPLES ,examples))762 $(eval $(call search_program_group,EXAMPLES)) 789 763 790 764 # get the list of example program source files from the gui directories 791 765 792 $(eval $(call search_program_group,GUI ,gui))766 $(eval $(call search_program_group,GUI)) 793 767 794 768 795 769 796 770 # manipulate these file lists to create our desired output files in the proper place 771 772 # this first target, 'everything' is a placeholder which makes the required subdirectories and then 773 # calls make again with the required directories made. Since these subdirectories are part of the 774 # search paths, make must see them when invoked otherwise it gets confused. 775 776 .PHONY : everything 777 778 ifeq ($(CROSS_COMPILING),1) 779 everything : native_dirs dirs 780 @$(MAKE) all 781 else 782 everything : dirs 783 @$(MAKE) all 784 endif 785 797 786 798 787 … … 828 817 endif 829 818 819 820 821 .PHONY : tools 822 823 tools : lib $(LIB_TOOLS_EXE_FILES) config-tool 824 825 $(LIB_TOOLS_EXE_FILES) : $(OUTPUT_LIB) 826 827 .PHONY : examples 828 829 examples: lib $(LIB_EXAMPLES_EXE_FILES) 830 831 $(LIB_EXAMPLES_EXE_FILES) : $(OUTPUT_LIB) 832 833 .PHONY : tests 834 835 tests: lib $(LIB_TESTS_EXE_FILES) 836 837 $(LIB_TESTS_EXE_FILES) : $(OUTPUT_LIB) 838 839 840 gui: lib $(LIB_GUI_EXE_FILES) 841 842 $(LIB_GUI_EXE_FILES) : $(OUTPUT_LIB) 830 843 831 844 .PHONY : install … … 921 934 922 935 936 .PHONY : native_tools 937 938 native-tools : native-lib $(NATIVE_LIB_TOOLS_EXE_FILES) 939 940 $(NATIVE_LIB_TOOLS_EXE_FILES) : $(NATIVE_OUTPUT_LIB) 941 942 .PHONY : native-examples 943 944 native-examples: native-lib $(NATIVE_LIB_EXAMPLES_EXE_FILES) 945 946 $(NATIVE_LIB_EXAMPLES_EXE_FILES) : $(NATIVE_OUTPUT_LIB) 947 948 .PHONY : native-tests 949 950 native-tests: native-lib $(NATIVE_LIB_TESTS_EXE_FILES) 951 952 $(NATIVE_LIB_TESTS_EXE_FILES) : $(NATIVE_OUTPUT_LIB) 923 953 924 954 .PHONY : native-test … … 968 998 @echo "RANLIB : $(RANLIB)" 969 999 @echo "COMPILE_FLAGS: $(COMPILE_FLAGS)" 970 @echo "DEFINES: $(DEFINES)"971 1000 @echo "LINK_FLAGS: $(LINK_FLAGS)" 972 1001 @echo "LDLIBS: $(LDLIBS)"
