Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 7f881cd8 in mainline for kernel/Makefile


Ignore:
Timestamp:
2017-11-06T21:04:24Z (4 years ago)
Author:
jzr <zarevucky.jiri@…>
Branches:
lfn, master
Children:
68825c3
Parents:
bd92e6d5
Message:

Simplify make precheck.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/Makefile

    rbd92e6d5 r7f881cd8  
    5959
    6060GENMAP = tools/genmap.py
    61 JOBFILE = $(ROOT_PATH)/tools/jobfile.py
    6261
    6362LINK = arch/$(KARCH)/_link.ld
    6463EMPTY_MAP = generic/src/debug/empty_map.o
    6564SIZEOK_MAP = generic/src/debug/sizeok_map.o
     65
     66ifeq ($(PRECHECK),y)
     67        JOBFILE = $(ROOT_PATH)/tools/jobfile.py
     68        # XXX: Do not change the order of arguments.
     69        CC_JOB = $(JOBFILE) $(JOB) $(CC) $< -o $@
     70else
     71        CC_JOB = $(CC) $< -o $@
     72endif
    6673
    6774.PHONY: all clean autogen_clean depend
     
    407414
    408415%.o: %.S | depend
    409         $(CC) -MD $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c -o $@ $<
    410 ifeq ($(PRECHECK),y)
    411         $(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(CFLAGS) -D__ASM__
    412 endif
     416        $(CC_JOB) -c -MD $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__
    413417
    414418%.o: %.s | depend
    415         $(CC) -MD $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__ -c -o $@ $<
    416 ifeq ($(PRECHECK),y)
    417         $(JOBFILE) $(JOB) $< $@ as asm $(DEFS) $(CFLAGS) $(EXTRA_FLAGS)
    418 endif
     419        $(CC_JOB) -c -MD $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__
    419420
    420421%.o: %.c | depend
    421         $(CC) -MD $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS) $(if $(findstring $<,$(INSTRUMENTED_SOURCES)),$(INSTRUMENTATION)) -c -o $@ $<
    422 ifeq ($(PRECHECK),y)
    423         $(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS)
    424 endif
     422        $(CC_JOB) -c -MD $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS) $(if $(findstring $<,$(INSTRUMENTED_SOURCES)),$(INSTRUMENTATION))
    425423
    426424$(REAL_MAP).o: $(REAL_MAP).bin
Note: See TracChangeset for help on using the changeset viewer.