Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2970 → Rev 2971

/branches/dynload/uspace/lib/rtld/Makefile
40,7 → 40,7
CFLAGS += -I../../app/iloader/include -Iinclude -fPIC -O0 -ggdb
LFLAGS = -shared --no-undefined
 
LIBS = $(LIBC_PREFIX)/libc.pic.a
LIBS = $(LIBC_PREFIX)/libc.pic.a $(SOFTINT_PREFIX)/libsoftint.pic.a
DEFS += -DRELEASE=\"$(RELEASE)\"
 
ifdef REVISION
/branches/dynload/uspace/lib/rtld/arch/ia32/src/runtime.c
78,18 → 78,6
return tls + ti->ti_offset;
}
 
void __umoddi3(void)
{
kputint(0x101);
*(int *)0 = 0; /* cause a page fault */
}
 
void __udivdi3(void)
{
kputint(0x102);
*(int *)0 = 0; /* cause a page fault */
}
 
void _putint(int i)
{
}
/branches/dynload/uspace/lib/softint/Makefile
1,5 → 1,6
#
# Copyright (c) 2005 Martin Decky
# Copyright (c) 2008 Jiri Svoboda
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
36,6 → 37,7
include $(LIBC_PREFIX)/Makefile.toolchain
 
CFLAGS += -Iinclude
PIC_CFLAGS := $(CFLAGS) -fPIC -D__PIC__
 
## Sources
#
47,22 → 49,29
 
GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES)))
 
OBJECTS := $(GENERIC_OBJECTS)
PIC_OBJECTS := $(addsuffix .pio,$(basename $(OBJECTS)))
 
.PHONY: all clean depend
 
all: libsoftint.a
all: libsoftint.a libsoftint.pic.a
 
-include Makefile.depend
 
clean:
-rm -f libsoftint.a Makefile.depend
find generic/ -name '*.o' -follow -exec rm \{\} \;
-rm -f libsoftint.a libsoftint.pic.a Makefile.depend
find generic/ \( -name '*.o' -o -name '*.pio' \) -follow -exec rm \{\} \;
 
depend:
-makedepend $(DEFS) $(CFLAGS) -f - $(GENERIC_SOURCES) > Makefile.depend 2> /dev/null
-makedepend $(DEFS) $(PIC_CFLAGS) -o.pio -f - $(GENERIC_SOURCES) >> Makefile.depend 2> /dev/null
 
libsoftint.a: depend $(ARCH_OBJECTS) $(GENERIC_OBJECTS)
$(AR) rc libsoftint.a $(ARCH_OBJECTS) $(GENERIC_OBJECTS)
libsoftint.a: depend $(OBJECTS)
$(AR) rc $@ $(OBJECTS)
 
libsoftint.pic.a: depend $(PIC_OBJECTS)
$(AR) rc $@ $(PIC_OBJECTS)
 
%.o: %.S
$(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@
 
71,3 → 80,12
 
%.o: %.c
$(CC) $(DEFS) $(CFLAGS) -c $< -o $@
 
%.pio: %.S
$(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@
 
%.pio: %.s
$(AS) $(AFLAGS) $< -o $@
 
%.pio: %.c
$(CC) $(DEFS) $(PIC_CFLAGS) -c $< -o $@