Add constants for fast path resume copying
[coreboot.git] / util / mkelfImage / linux-i386 / Makefile
1 LI386_DIR:=linux-i386
2 LI386_OBJ:=$(OBJDIR)/$(LI386_DIR)
3 LI386_DEP=Makefile Makefile.conf $(LI386_DIR)/Makefile
4
5 $(LI386_OBJ)/mkelf-linux-i386.o: $(LI386_DIR)/mkelf-linux-i386.c $(LI386_DIR)/convert.bin.c $(LI386_DEP)
6         $(MKDIR) -p $(@D)
7         $(HOST_CC) $(HOST_CFLAGS) -c -g $< -o $@
8
9
10 ifdef I386_CC
11
12 $(LI386_DIR)/convert.bin.c: $(LI386_OBJ)/convert.bin $(OBJDIR)/bin/bin-to-hex $(LI386_DEP)
13         $(MKDIR) -p $(@D)
14         $(OBJDIR)/bin/bin-to-hex < $(LI386_OBJ)/convert.bin > $@
15
16 $(LI386_OBJ)/convert.bin: $(LI386_OBJ)/convert $(LI386_DEP)
17         $(MKDIR) -p $(@D)
18         $(I386_OBJCOPY) -O binary $< $@
19
20 CONVERT_LI386_OBJS=$(LI386_OBJ)/head.o $(LI386_OBJ)/convert_params.o
21
22 $(LI386_OBJ)/convert: $(LI386_DIR)/convert.lds $(CONVERT_LI386_OBJS) $(LI386_DEP)
23         $(MKDIR) -p $(@D)
24         $(I386_LD) $(I386_LDFLAGS) -T $(LI386_DIR)/convert.lds -o $@ $(CONVERT_LI386_OBJS)
25
26 $(LI386_OBJ)/head.o: $(LI386_DIR)/head.S $(LI386_DIR)/convert.h
27         $(MKDIR) -p $(@D)
28         $(I386_CPP) $(I386_CPPFLAGS) -DASSEMBLY $< | $(I386_AS) $(I386_ASFLAGS) -o $@
29
30 $(LI386_OBJ)/convert_params.o: $(LI386_DIR)/convert_params.c $(LI386_DIR)/convert.h $(LI386_DEP)
31         $(MKDIR) -p $(@D)
32         $(I386_CC) $(I386_CFLAGS) -c -o $@ $<
33
34 endif
35