Changeset 4761f54 in mainline
- Timestamp:
- 2017-10-21T04:41:07Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9c14309
- Parents:
- feab36ae
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
.bzrignore
rfeab36ae r4761f54 5 5 *.prev 6 6 *.so.* 7 *.d 7 8 Makefile.ag.depend 8 9 Makefile.common 9 10 Makefile.config 10 Makefile.depend11 11 autotool/ 12 12 boot/distroot/ -
boot/Makefile
rfeab36ae r4761f54 126 126 $(MAKE) -r -f $(POSTBUILD) clean PRECHECK=$(PRECHECK) 127 127 endif 128 rm -f $(POST_OUTPUT) $(BOOT_OUTPUT) $(DEPEND) $(DEPEND_PREV)arch/*/include/common.h128 rm -f $(POST_OUTPUT) $(BOOT_OUTPUT) arch/*/include/common.h 129 129 find generic/src/ arch/*/src/ genarch/src/ -name '*.o' -follow -exec rm \{\} \; 130 find generic/src/ arch/*/src/ genarch/src/ -name '*.d' -follow -exec rm \{\} \; 130 131 131 132 clean_dist: -
boot/Makefile.build
rfeab36ae r4761f54 27 27 # 28 28 29 .PHONY: all clean 29 .PHONY: all clean depend 30 30 31 31 include Makefile.common … … 64 64 endif 65 65 66 ifeq ($(COMPILER),gcc_native)67 CFLAGS = $(COMMON_CFLAGS) $(GCC_CFLAGS) $(EXTRA_CFLAGS)68 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)69 endif70 71 ifeq ($(COMPILER),gcc_cross)72 CFLAGS = $(COMMON_CFLAGS) $(GCC_CFLAGS) $(EXTRA_CFLAGS)73 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)74 endif75 76 ifeq ($(COMPILER),gcc_helenos)77 CFLAGS = $(COMMON_CFLAGS) $(GCC_CFLAGS) $(EXTRA_CFLAGS)78 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)79 endif80 81 66 ifeq ($(COMPILER),clang) 82 67 CFLAGS = $(COMMON_CFLAGS) $(CLANG_CFLAGS) $(EXTRA_CFLAGS) 83 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) 68 else 69 CFLAGS = $(COMMON_CFLAGS) $(GCC_CFLAGS) $(EXTRA_CFLAGS) 84 70 endif 85 71 86 72 OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) 73 DEPENDS := $(addsuffix .d,$(basename $(SOURCES))) 87 74 88 75 all: $(VERSION_DEF) $(COMMON_MAKEFILE) $(COMMON_HEADER) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) $(BOOT_OUTPUT) 89 -[ -f $(DEPEND) ] && cp -a $(DEPEND) $(DEPEND_PREV)90 76 91 77 clean: 92 78 rm -f $(RAW) $(MAP) $(ARCH_INCLUDE) $(GENARCH_INCLUDE) 93 79 94 ifneq ($(MAKECMDGOALS),clean) 95 -include $(DEPEND) 96 endif 80 -include $(DEPENDS) 97 81 98 82 AS_CFLAGS := $(addprefix -Xassembler ,$(AFLAGS)) … … 104 88 $(LD) -n $(LFLAGS) -T $(LINK) -M -Map $(MAP) -o $@ $(OBJECTS) 105 89 106 $(LINK): $(DEPEND)90 $(LINK): | depend 107 91 $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -D__LINKER__ -E -x c $(LINK).in | grep -v "^\#" > $(LINK) 108 92 109 %.o: %.S $(DEPEND)110 $(CC) $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@93 %.o: %.S | depend 94 $(CC) -MD $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@ 111 95 ifeq ($(PRECHECK),y) 112 96 $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(CFLAGS) -D__ASM__ 113 97 endif 114 98 115 %.o: %.c $(DEPEND)116 $(CC) $(DEFS) $(CFLAGS) -c $< -o $@99 %.o: %.c | depend 100 $(CC) -MD $(DEFS) $(CFLAGS) -c $< -o $@ 117 101 ifeq ($(PRECHECK),y) 118 102 $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) 119 103 endif 120 104 121 %.o: %.s $(DEPEND)122 $(CC) $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@105 %.o: %.s | depend 106 $(CC) -MD $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@ 123 107 ifeq ($(PRECHECK),y) 124 108 $(JOBFILE) $(JOB) $< $@ as asm 125 109 endif 126 110 127 $(DEPEND): $(ARCH_INCLUDE) $(GENARCH_INCLUDE) $(COMMON_HEADER_ARCH) $(PRE_DEPEND) 128 makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) > $@ 2> /dev/null 129 -[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@ 111 depend: $(ARCH_INCLUDE) $(GENARCH_INCLUDE) $(COMMON_HEADER_ARCH) $(PRE_DEPEND) 130 112 131 113 $(COMPS).s: $(COMPS).zip -
boot/Makefile.common
rfeab36ae r4761f54 63 63 GENARCH_INCLUDE = generic/include/genarch 64 64 65 DEPEND = Makefile.depend66 DEPEND_PREV = $(DEPEND).prev67 65 DISTROOT = distroot 68 66 INITRD = initrd -
kernel/Makefile
rfeab36ae r4761f54 49 49 50 50 AGDEPEND = Makefile.ag.depend 51 DEPEND = Makefile.depend52 DEPEND_PREV = $(DEPEND).prev53 51 RAW = kernel.raw 54 52 BIN = kernel.bin … … 67 65 SIZEOK_MAP = generic/src/debug/sizeok_map.o 68 66 69 .PHONY: all clean autogen_clean 67 .PHONY: all clean autogen_clean depend 70 68 71 69 all: $(VERSION_DEF) $(COMMON_MAKEFILE) $(COMMON_HEADER) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) $(BIN) $(DISASM) 72 -[ -f $(DEPEND) ] && cp -a $(DEPEND) $(DEPEND_PREV)73 70 74 71 clean: autogen_clean 75 rm -f $( DEPEND) $(DEPEND_PREV) $(RAW) $(BIN) $(MAP) $(JOB) $(MAP_PREV) $(DISASM) $(DUMP) $(REAL_MAP).* arch/*/_link.ld arch/*/include/arch/common.h72 rm -f $(RAW) $(BIN) $(MAP) $(JOB) $(MAP_PREV) $(DISASM) $(DUMP) $(REAL_MAP).* arch/*/_link.ld arch/*/include/arch/common.h 76 73 find generic/src/ arch/*/src/ genarch/src/ test/ -name '*.o' -follow -exec rm '{}' \; 74 find generic/src/ arch/*/src/ genarch/src/ test/ -name '*.d' -follow -exec rm '{}' \; 77 75 78 76 ## Common compiler flags … … 129 127 -include arch/$(KARCH)/Makefile.inc 130 128 -include genarch/Makefile.inc 131 -include $(DEPEND)132 129 -include $(AGDEPEND) 133 130 … … 152 149 # 153 150 154 ifeq ($(COMPILER),gcc_native)155 CFLAGS = $(COMMON_CFLAGS) $(GCC_CFLAGS)156 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)157 INSTRUMENTATION = -finstrument-functions158 endif159 160 ifeq ($(COMPILER),gcc_cross)161 CFLAGS = $(COMMON_CFLAGS) $(GCC_CFLAGS)162 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)163 INSTRUMENTATION = -finstrument-functions164 endif165 166 ifeq ($(COMPILER),gcc_helenos)167 CFLAGS = $(COMMON_CFLAGS) $(GCC_CFLAGS)168 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)169 INSTRUMENTATION = -finstrument-functions170 endif171 172 151 ifeq ($(COMPILER),clang) 173 152 CFLAGS = $(COMMON_CFLAGS) $(CLANG_CFLAGS) 174 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) 175 INSTRUMENTATION = -finstrument-functions 176 endif 177 153 else 154 CFLAGS = $(COMMON_CFLAGS) $(GCC_CFLAGS) 155 endif 156 157 INSTRUMENTATION = -finstrument-functions 178 158 179 159 ## Generic kernel sources … … 364 344 GENARCH_OBJECTS := $(addsuffix .o,$(basename $(GENARCH_SOURCES))) 365 345 346 GENERIC_DEPENDS := $(addsuffix .d,$(basename $(GENERIC_SOURCES))) 347 ARCH_DEPENDS := $(addsuffix .d,$(basename $(ARCH_SOURCES))) 348 GENARCH_DEPENDS := $(addsuffix .d,$(basename $(GENARCH_SOURCES))) 349 366 350 GENARCH_AUTOGENS_H := $(addsuffix .h,$(basename $(GENARCH_AUTOGENS_AG))) 367 351 GENARCH_AUTOGENS_PROBE_C := $(addsuffix .ag.probe.c,$(basename $(GENARCH_AUTOGENS_AG))) … … 378 362 LD_CFLAGS := $(addprefix -Xlinker ,$(LFLAGS)) 379 363 364 -include $(GENERIC_DEPENDS) 365 -include $(ARCH_DEPENDS) 366 -include $(GENARCH_DEPENDS) 367 380 368 ifeq ($(COMPILER),clang) 381 369 AS_CFLAGS += -mllvm -asm-macro-max-nesting-depth=1000 … … 408 396 endif 409 397 410 $(LINK): $(LINK).in $(DEPEND)398 $(LINK): $(LINK).in | depend 411 399 $(CC) $(DEFS) $(CFLAGS) -D__ASM__ -D__LINKER__ -E -x c $< | grep -v "^\#" > $@ 412 400 … … 416 404 $(AUTOGEN) generate $< <$<.probe.s >$@ 417 405 418 %.o: %.S $(DEPEND)419 $(CC) $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c -o $@ $<406 %.o: %.S | depend 407 $(CC) -MD $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c -o $@ $< 420 408 ifeq ($(PRECHECK),y) 421 409 $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(CFLAGS) -D__ASM__ 422 410 endif 423 411 424 %.o: %.s $(DEPEND)425 $(CC) $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c -o $@ $<412 %.o: %.s | depend 413 $(CC) -MD $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c -o $@ $< 426 414 ifeq ($(PRECHECK),y) 427 415 $(JOBFILE) $(JOB) $< $@ as asm $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) 428 416 endif 429 417 430 %.o: %.c $(DEPEND)431 $(CC) $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS) $(if $(findstring $<,$(INSTRUMENTED_SOURCES)),$(INSTRUMENTATION)) -c -o $@ $<418 %.o: %.c | depend 419 $(CC) -MD $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS) $(if $(findstring $<,$(INSTRUMENTED_SOURCES)),$(INSTRUMENTATION)) -c -o $@ $< 432 420 ifeq ($(PRECHECK),y) 433 421 $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS) … … 470 458 done 471 459 472 $(DEPEND): $(COMMON_HEADER_ARCH) $(AUTOGENS_H) 473 makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(ARCH_SOURCES) $(GENARCH_SOURCES) $(GENERIC_SOURCES) > $@ 2> /dev/null 474 -[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@ 460 depend: $(COMMON_HEADER_ARCH) $(AUTOGENS_H) 475 461 476 462 $(COMMON_HEADER_ARCH): $(COMMON_HEADER) -
tools/autotool.py
rfeab36ae r4761f54 850 850 check_app(["diff", "--version"], "Diff utility", "usually part of diffutils") 851 851 check_app(["make", "--version"], "Make utility", "preferably GNU Make") 852 check_app(["makedepend", "-f", "-"], "Makedepend utility", "usually part of imake or xutils")853 852 check_app(["unzip"], "unzip utility", "usually part of zip/unzip utilities") 854 853 -
uspace/Makefile.common
rfeab36ae r4761f54 100 100 endif 101 101 102 DEPEND = Makefile.depend103 DEPEND_PREV = $(DEPEND).prev104 105 102 LIB_PREFIX = $(USPACE_PREFIX)/lib 106 103 … … 223 220 endif 224 221 225 .PHONY: all clean 222 .PHONY: all clean depend 226 223 227 224 all: $(VERSION_DEF) $(COMMON_MAKEFILE) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) $(LIBS) $(OUTPUT) $(LOUTPUT) $(EXTRA_OUTPUT) 228 -[ -f $(DEPEND) ] && cp -a $(DEPEND) $(DEPEND_PREV)229 225 230 226 all-test: $(TEST_OUTPUT) $(TEST_DISASM) 231 227 232 228 clean: 233 rm -f $(DEPEND ) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(LARCHIVE) $(LOUTPUT) $(EXTRA_OUTPUT) $(EXTRA_CLEAN)229 rm -f $(DEPENDS) $(JOB) $(OUTPUT) $(LARCHIVE) $(LOUTPUT) $(EXTRA_OUTPUT) $(EXTRA_CLEAN) 234 230 find . -name '*.o' -follow -exec rm \{\} \; 235 231 find . -name '*.lo' -follow -exec rm \{\} \; … … 276 272 JOBFILE = $(LIBC_PREFIX)/../../../tools/jobfile.py 277 273 278 ifeq ($(COMPILER),gcc_cross)279 CFLAGS += $(COMMON_CFLAGS) $(GCC_CFLAGS)280 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)281 endif282 283 ifeq ($(COMPILER),gcc_helenos)284 CFLAGS += $(COMMON_CFLAGS) $(GCC_CFLAGS)285 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)286 endif287 288 ifeq ($(COMPILER),gcc_native)289 CFLAGS += $(COMMON_CFLAGS) $(GCC_CFLAGS)290 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)291 endif292 293 274 ifeq ($(COMPILER),clang) 294 275 CFLAGS += $(COMMON_CFLAGS) $(CLANG_CFLAGS) 295 DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) 276 else 277 CFLAGS += $(COMMON_CFLAGS) $(GCC_CFLAGS) 296 278 endif 297 279 298 280 LIB_CFLAGS = $(CFLAGS) -fPIC 299 281 LIB_LFLAGS = $(LFLAGS) -shared -soname $(LSONAME) --whole-archive 300 301 ifneq ($(MAKECMDGOALS),clean)302 -include $(DEPEND)303 endif304 282 305 283 AS_CFLAGS := $(addprefix -Xassembler ,$(AFLAGS)) … … 309 287 LOBJECTS := $(addsuffix .lo,$(basename $(SOURCES))) 310 288 TEST_OBJECTS := $(addsuffix .test.o,$(basename $(TEST_SOURCES))) 289 DEPENDS := $(addsuffix .d,$(basename $(SOURCES))) $(addsuffix .test.d,$(basename $(TEST_SOURCES))) 290 291 -include $(DEPENDS) 311 292 312 293 ifneq ($(BINARY),) … … 367 348 endif 368 349 369 %.o: %.S $(DEPEND)370 $(CC) $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@350 %.o: %.S | depend 351 $(CC) -MD $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@ 371 352 ifeq ($(PRECHECK),y) 372 353 $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) -D__ASM__ 373 354 endif 374 355 375 %.o: %.s $(DEPEND)376 $(CC) $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@356 %.o: %.s | depend 357 $(CC) -MD $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@ 377 358 ifeq ($(PRECHECK),y) 378 359 $(JOBFILE) $(JOB) $< $@ as asm 379 360 endif 380 361 381 %.o: %.c $(DEPEND)382 $(CC) $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@362 %.o: %.c | depend 363 $(CC) -MD $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@ 383 364 ifeq ($(PRECHECK),y) 384 365 $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) 385 366 endif 386 367 387 %.test.o: %.c $(DEPEND)388 $(CC) $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(TEST_CFLAGS) -c $< -o $@368 %.test.o: %.c | depend 369 $(CC) -MD $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(TEST_CFLAGS) -c $< -o $@ 389 370 ifeq ($(PRECHECK),y) 390 371 $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(TEST_CFLAGS) 391 372 endif 392 373 393 %.lo: %.S $(DEPEND)394 $(CC) $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@374 %.lo: %.S | depend 375 $(CC) -MD $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@ 395 376 ifeq ($(PRECHECK),y) 396 377 $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) -D__ASM__ 397 378 endif 398 379 399 %.lo: %.s $(DEPEND)400 $(CC) $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@380 %.lo: %.s | depend 381 $(CC) -MD $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS) -D__ASM__ -c $< -o $@ 401 382 ifeq ($(PRECHECK),y) 402 383 $(JOBFILE) $(JOB) $< $@ as asm 403 384 endif 404 385 405 %.lo: %.c $(DEPEND)406 $(CC) $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@386 %.lo: %.c | depend 387 $(CC) -MD $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@ 407 388 ifeq ($(PRECHECK),y) 408 389 $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) 409 390 endif 410 391 411 $(DEPEND): $(PRE_DEPEND) 412 makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) $(EXTRA_CFLAGS) -- $(SOURCES) > $@ 2> /dev/null 413 makedepend -f - -o.test.o -- $(DEPEND_DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(TEST_CFLAGS) -- $(TEST_SOURCES) >> $@ 2> /dev/null 414 -[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@ 392 depend: $(PRE_DEPEND) 415 393 416 394 ## -
uspace/lib/pcut/Makefile
rfeab36ae r4761f54 25 25 $(PCUT_TEST_PREFIX)xmlreport$(PCUT_TEST_SUFFIX) 26 26 27 EXTRA_CLEAN = $(SELF_TESTS) 27 EXTRA_CLEAN = $(SELF_TESTS) tests/*.d 28 28 29 29 include helenos.mak
Note:
See TracChangeset
for help on using the changeset viewer.