cygwin fixes

This commit is contained in:
BVK Chaitanya 2010-05-27 17:04:31 -07:00
parent ac4d5ab783
commit f17ead43f9
2 changed files with 19 additions and 12 deletions

View file

@ -23,16 +23,6 @@ kernel_img_CFLAGS = $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Wno-char-subscripts -Wn
kernel_img_LDFLAGS = $(COMMON_LDFLAGS) kernel_img_LDFLAGS = $(COMMON_LDFLAGS)
TARGET_NO_STRIP = yes TARGET_NO_STRIP = yes
noinst_MODULES = emu-full.mod
emu_full_mod_SOURCES = kern/emu/full.c
emu_full_mod_CFLAGS = $(COMMON_CFLAGS)
emu_full_mod_LDFLAGS = $(COMMON_LDFLAGS)
noinst_MODULES = emu-lite.mod
emu_lite_mod_SOURCES = kern/emu/lite.c kern/emu/cache.S symlist.c
emu_lite_mod_CFLAGS = $(COMMON_CFLAGS)
emu_lite_mod_LDFLAGS = $(COMMON_LDFLAGS)
# For halt.mod. # For halt.mod.
pkglib_MODULES += halt.mod pkglib_MODULES += halt.mod
halt_mod_SOURCES = commands/halt.c halt_mod_SOURCES = commands/halt.c
@ -111,12 +101,28 @@ grub_emu_init.o: grub_emu_init.c grub_emu_init.h
rm -f $@; $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -DGRUB_FILE=\"grub_init.c\" -c -o $@ $< rm -f $@; $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -DGRUB_FILE=\"grub_init.c\" -c -o $@ $<
CLEANFILES += grub_emu_init.o CLEANFILES += grub_emu_init.o
kern_emu_lite.o: kern/emu/lite.c
$(TARGET_CC) $(COMMON_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -DGRUB_FILE=\"kern/emu/lite.c\" -c -o $@ $<
CLEANFILES += kern_emu_lite.o
kern_emu_full.o: kern/emu/full.c
$(TARGET_CC) $(COMMON_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -DGRUB_FILE=\"kern/emu/full.c\" -c -o $@ $<
CLEANFILES += kern_emu_full.o
kern_emu_cache.o: kern/emu/cache.S
$(TARGET_CC) $(COMMON_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(TARGET_ASFLAGS) -DGRUB_FILE=\"kern/emu/cache.S\" -c -o $@ $<
CLEANFILES += kern_emu_cache.o
symlist.o: symlist.c
$(TARGET_CC) $(COMMON_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -DGRUB_FILE=\"symlist.c\" -c -o $@ $<
CLEANFILES += symlist.o
CLEANFILES += grub-emu-lite CLEANFILES += grub-emu-lite
grub-emu-lite: $(pkglib_PROGRAMS) emu-lite.mod grub-emu-lite: kern_emu_lite.o kern_emu_cache.o symlist.o kernel.img
$(CC) -o $@ $^ $(grub_emu_LDFLAGS) $(LDFLAGS) $(CC) -o $@ $^ $(grub_emu_LDFLAGS) $(LDFLAGS)
GRUB_EMU_LITE=grub-emu-lite GRUB_EMU_LITE=grub-emu-lite
CLEANFILES += grub-emu CLEANFILES += grub-emu
grub-emu: $(pkglib_MODULES) $(pkglib_PROGRAMS) emu-full.mod grub_emu_init.o grub-emu: $(PREMODFILES) kern_emu_full.o grub_emu_init.o kernel.img
$(CC) -o $@ $^ $(grub_emu_LDFLAGS) $(LDFLAGS) $(CC) -o $@ $^ $(grub_emu_LDFLAGS) $(LDFLAGS)
GRUB_EMU=grub-emu GRUB_EMU=grub-emu

View file

@ -161,6 +161,7 @@ endif
#{pre_obj}: $(#{prefix}_DEPENDENCIES) #{objs_str} #{pre_obj}: $(#{prefix}_DEPENDENCIES) #{objs_str}
-rm -f $@ -rm -f $@
$(TARGET_CC) $(#{prefix}_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ #{objs_str} $(TARGET_CC) $(#{prefix}_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ #{objs_str}
PREMODFILES += #{pre_obj}
#{mod_obj}: #{mod_src} #{mod_obj}: #{mod_src}
$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(#{prefix}_CFLAGS) -DGRUB_FILE=\\\"#{mod_src}\\\" -c -o $@ $< $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(#{prefix}_CFLAGS) -DGRUB_FILE=\\\"#{mod_src}\\\" -c -o $@ $<