From 51121b83f47e7619a7c64d52c8dac5c78b9fd7ee Mon Sep 17 00:00:00 2001 From: John Hodge Date: Wed, 12 Oct 2011 11:26:38 +0800 Subject: [PATCH] Usermode - Fixed GAS/NASM detection --- Usermode/Libraries/Makefile.cfg | 2 +- Usermode/Libraries/Makefile.tpl | 4 ++++ Usermode/Libraries/ld-acess.so_src/Makefile | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Usermode/Libraries/Makefile.cfg b/Usermode/Libraries/Makefile.cfg index f9e3d672..a9b01919 100644 --- a/Usermode/Libraries/Makefile.cfg +++ b/Usermode/Libraries/Makefile.cfg @@ -5,7 +5,7 @@ MAKEDEP = $(CC) -M -ASFLAGS += -D ARCHDIR=$(ARCHDIR) +ASFLAGS += -D ARCHDIR=$(ARCHDIR) -D __ASSEMBLER__=1 CPPFLAGS := -I$(ACESSDIR)/Usermode/include/ -DARCHDIR=$(ARCHDIR) -DARCHDIR_is_$(ARCHDIR)=1 CFLAGS := -g -Wall -fPIC -fno-builtin -fno-stack-protector $(CPPFLAGS) LDFLAGS := -g -nostdlib -shared -I/Acess/Libs/ld-acess.so -e SoMain -x -L$(OUTPUTDIR)Libs/ diff --git a/Usermode/Libraries/Makefile.tpl b/Usermode/Libraries/Makefile.tpl index adf1c7ec..47acb800 100644 --- a/Usermode/Libraries/Makefile.tpl +++ b/Usermode/Libraries/Makefile.tpl @@ -47,7 +47,11 @@ $(_OBJPREFIX)%.ao: %.$(ASSUFFIX) @echo [AS] -o $@ @mkdir -p $(dir $@) @$(AS) $(ASFLAGS) -o $@ $< +ifeq ($(ASSUFFIX),S) @$(AS) $(ASFLAGS) -o $@.dep $< -M +else + @$(AS) $(ASFLAGS) -o $@ $< -M > $@.dep +endif #$(OUTPUTDIR)Libs/libld-acess.so: # @make -C $(ACESSDIR)/Usermode/Libraries/ld-acess.so_src/ diff --git a/Usermode/Libraries/ld-acess.so_src/Makefile b/Usermode/Libraries/ld-acess.so_src/Makefile index 2a7a1862..178b75e3 100644 --- a/Usermode/Libraries/ld-acess.so_src/Makefile +++ b/Usermode/Libraries/ld-acess.so_src/Makefile @@ -34,5 +34,5 @@ $(_XBIN): $(_OBJPREFIX)_stublib.o $(_OBJPREFIX)%: %.h @echo [CPP] -o $@ @mkdir -p $(dir $@) - @$(CPP) $(CPPFLAGS) -P -D__ASM__ $< -o $@ + @$(CPP) $(CPPFLAGS) -P -D__ASSEMBLER__ $< -o $@ -- 2.20.1