git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Usermode/libc - Minor fix to memmove
[tpg/acess2.git]
/
Usermode
/
Libraries
/
ld-acess.so_src
/
Makefile
diff --git
a/Usermode/Libraries/ld-acess.so_src/Makefile
b/Usermode/Libraries/ld-acess.so_src/Makefile
index
a29dd4b
..
4dc881c
100644
(file)
--- a/
Usermode/Libraries/ld-acess.so_src/Makefile
+++ b/
Usermode/Libraries/ld-acess.so_src/Makefile
@@
-5,14
+5,27
@@
-include ../Makefile.cfg
OBJ := main.o lib.o loadlib.o export.o elf.o pe.o
-include ../Makefile.cfg
OBJ := main.o lib.o loadlib.o export.o elf.o pe.o
-OBJ += arch/$(ARCHDIR).ao
+OBJ += arch/$(ARCHDIR).ao
_
BIN = ld-acess.so
EXTRABIN := libld-acess.so
BIN = ld-acess.so
EXTRABIN := libld-acess.so
+EXTRACLEAN = $(_OBJPREFIX)_stublib.o
+INCFILES := sys/sys.h
-CFLAGS = -g -Wall -fno-builtin -fno-leading-underscore -fno-stack-protector -fPIC
+CFLAGS = -g -Wall -fno-builtin -fno-stack-protector -fPIC -std=c99
+# -fno-leading-underscore
CFLAGS += $(CPPFLAGS)
LDFLAGS = -g -T arch/$(ARCHDIR).ld -Map map.txt --export-dynamic
CFLAGS += $(CPPFLAGS)
LDFLAGS = -g -T arch/$(ARCHDIR).ld -Map map.txt --export-dynamic
+ifeq ($(ARCH),native)
+XBIN := $(addprefix $(OUTPUTDIR)Libs/,$(EXTRABIN))
+$(XBIN): obj-$(ARCH)/_stublib.o
+all: $(XBIN)
+CFLAGS += -ffreestanding
+LDFLAGS :=
+BIN :=
+OBJ :=
+endif
+
include ../Makefile.tpl
# create libld-acess.so
include ../Makefile.tpl
# create libld-acess.so
@@
-23,16
+36,20
@@
$(_XBIN): $(_OBJPREFIX)_stublib.o
# Override .ao to look in the object prefix for the source
# Override .ao to look in the object prefix for the source
-%.ao: %.asm
+$(_OBJPREFIX)arch/$(ARCHDIR).ao_: $(_OBJPREFIX)arch/$(ARCHDIR).$(ASSUFFIX)
@echo [AS] -o $@
@mkdir -p $(dir $@)
@$(AS) $(ASFLAGS) -o $@ $<
@echo [AS] -o $@
@mkdir -p $(dir $@)
@$(AS) $(ASFLAGS) -o $@ $<
-.PRECIOUS: $(OBJ:%.ao=%.asm)
+
#
.PRECIOUS: $(OBJ:%.ao=%.asm)
# Preprocessing objects if needed
# Preprocessing objects if needed
-$(_OBJPREFIX)
%: %
.h
+$(_OBJPREFIX)
arch/$(ARCHDIR).$(ASSUFFIX): arch/$(ARCHDIR).$(ASSUFFIX).h arch/syscalls.s
.h
@echo [CPP] -o $@
@mkdir -p $(dir $@)
@echo [CPP] -o $@
@mkdir -p $(dir $@)
- @$(CPP) $(CPPFLAGS) -P -D_ASM_ $< -o $@
+ @$(CPP) $(CPPFLAGS) -P -D__ASSEMBLER__ $< -o $@
+
+$(_OBJPREFIX)arch/$(ARCHDIR).$(ASSUFFIX): $(ACESSDIR)/KernelLand/Kernel/include/syscalls.h
+
+$(_OBJPREFIX)_stublib.o: arch/syscalls.s.h
UCC
git Repository :: git.ucc.asn.au