8 OBJ := main.o syscalls.o request.o binary.o memory.o
10 OBJ := $(addsuffix .$(PLATFORM),$(OBJ))
12 ifeq ($(PLATFORM),win)
13 BIN := ../ld-acess.exe
15 ifeq ($(PLATFORM),lin)
20 CFLAGS += -Wall -Werror -g -m32
22 DEPFILES = $(filter %.o.$(PLATFORM),$(OBJ))
23 DEPFILES := $(DEPFILES:%.o.$(PLATFORM)=%.d.$(PLATFORM))
32 $(BIN): link.ld.$(PLATFORM) $(OBJ)
33 # $(LD) -g -o $@ $(OBJ) -T link.ld.$(PLATFORM)
34 $(CC) -g -o $@ $(OBJ) -m32 -Wl,-T,link.ld.$(PLATFORM)
38 @$(CC) -c $< -o $@ $(CFLAGS) $(CPPFLAGS)
39 @$(CC) -M $(CPPFLAGS) -MT $@ -o $*.d.$(PLATFORM) $<
41 # Modify the default makefile to put the executable at 1MB instead
43 @echo Making Linker Script ($@)
44 @$(LD) --verbose | awk '{ if( substr($$0,0,5) == "====="){ bPrint = !bPrint; } else { if(bPrint){ print $$0;} } }' | sed 's/\b0x0[08][0-9]*\b/0x00100000/g' > $@