From: John Hodge Date: Wed, 12 Oct 2011 03:26:38 +0000 (+0800) Subject: Usermode - Fixed GAS/NASM detection X-Git-Tag: rel0.12~2 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=51121b83f47e7619a7c64d52c8dac5c78b9fd7ee;p=tpg%2Facess2.git Usermode - Fixed GAS/NASM detection --- 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 $@