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
Oops
[tpg/acess2.git]
/
AcessNative
/
ld-acess_src
/
Makefile
diff --git
a/AcessNative/ld-acess_src/Makefile
b/AcessNative/ld-acess_src/Makefile
index
eb84ad8
..
bbce43d
100644
(file)
--- a/
AcessNative/ld-acess_src/Makefile
+++ b/
AcessNative/ld-acess_src/Makefile
@@
-5,9
+5,9
@@
ifeq ($(PLATFORM),)
PLATFORM := lin
endif
PLATFORM := lin
endif
-OBJ := main.o syscalls.o request.o binary.o memory.o
-OBJ += elf.o
-OBJ := $(add
suffix .$(PLATFORM)
,$(OBJ))
+OBJ := main.o syscalls.o request.o binary.o memory.o
exports.o
+OBJ += elf.o
elf_load.o
+OBJ := $(add
prefix obj-$(PLATFORM)/
,$(OBJ))
ifeq ($(PLATFORM),win)
BIN := ../ld-acess.exe
ifeq ($(PLATFORM),win)
BIN := ../ld-acess.exe
@@
-19,8
+19,8
@@
endif
CFLAGS += -Wall -Werror -g -m32
CFLAGS += -Wall -Werror -g -m32
-DEPFILES = $(filter %.o
.$(PLATFORM)
,$(OBJ))
-DEPFILES := $(DEPFILES:%
.o.$(PLATFORM)=%.d.$(PLATFORM)
)
+DEPFILES = $(filter %.o,$(OBJ))
+DEPFILES := $(DEPFILES:%
=%.dep
)
.PHONY: all clean
.PHONY: all clean
@@
-29,18
+29,19
@@
all: $(BIN)
clean:
$(RM) $(BIN) $(OBJ) $(DEPFILES)
clean:
$(RM) $(BIN) $(OBJ) $(DEPFILES)
-$(BIN): link.ld.$(PLATFORM) $(OBJ)
-# $(LD) -g -o $@ $(OBJ) -T link.ld.$(PLATFORM)
- $(CC) -g -o $@ $(OBJ) -m32 -Wl,-T,link.ld.$(PLATFORM)
+$(BIN): obj-$(PLATFORM)/link.ld $(OBJ)
+ $(CC) -g -o $@ $(OBJ) -m32 -Wl,-T,obj-$(PLATFORM)/link.ld
-%.o.$(PLATFORM): %.c
+obj-$(PLATFORM)/%.o: %.c
+ @mkdir -p $(dir $@)
@echo [CC] -o $@
@$(CC) -c $< -o $@ $(CFLAGS) $(CPPFLAGS)
@echo [CC] -o $@
@$(CC) -c $< -o $@ $(CFLAGS) $(CPPFLAGS)
- @$(CC) -M $(CPPFLAGS) -MT $@ -o $
*.d.$(PLATFORM)
$<
+ @$(CC) -M $(CPPFLAGS) -MT $@ -o $
@.dep
$<
# Modify the default makefile to put the executable at 1MB instead
# Modify the default makefile to put the executable at 1MB instead
-link.ld.lin:
- @echo Making Linker Script ($@)
+obj-lin/link.ld:
+ @mkdir -p $(dir $@)
+ @echo "Making Linker Script ($@)"
@$(LD) --verbose | awk '{ if( substr($$0,0,5) == "====="){ bPrint = !bPrint; } else { if(bPrint){ print $$0;} } }' | sed 's/\b0x0[08][0-9]*\b/0x00100000/g' > $@
-include $(DEPFILES)
@$(LD) --verbose | awk '{ if( substr($$0,0,5) == "====="){ bPrint = !bPrint; } else { if(bPrint){ print $$0;} } }' | sed 's/\b0x0[08][0-9]*\b/0x00100000/g' > $@
-include $(DEPFILES)
UCC
git Repository :: git.ucc.asn.au