diff --git a/src/project.conf b/src/project.conf index 99b1cbb..570f48b 100644 --- a/src/project.conf +++ b/src/project.conf @@ -1,5 +1,5 @@ subdirs=arch,format -targets=libAsm,asm,asm-static,deasm,deasm-static +targets=libAsm,asm,deasm cppflags_force=-I ../include cppflags= cflags_force=-W `pkg-config --cflags cpp` @@ -21,11 +21,6 @@ depends=$(OBJDIR)libAsm.so ldflags=-L$(OBJDIR). -Wl,-rpath,$(LIBDIR) -lAsm install=$(BINDIR) -[asm-static] -type=binary -depends=$(OBJDIR)main.o,$(OBJDIR)libAsm.a -ldflags=$(OBJDIR)main.o $(OBJDIR)libAsm.a - [deasm] type=binary sources=deasm.c @@ -33,11 +28,6 @@ depends=$(OBJDIR)libAsm.so ldflags=-L$(OBJDIR). -Wl,-rpath,$(LIBDIR) -lAsm install=$(BINDIR) -[deasm-static] -type=binary -depends=$(OBJDIR)deasm.o,$(OBJDIR)libAsm.a -ldflags=$(OBJDIR)deasm.o $(OBJDIR)libAsm.a - [arch.c] depends=../include/Asm/arch.h,../include/Asm/asm.h,arch.h,code.h,../config.h cppflags=-D PREFIX=\"$(PREFIX)\" diff --git a/tests/project.conf b/tests/project.conf index f2d5ae7..77dfa87 100644 --- a/tests/project.conf +++ b/tests/project.conf @@ -1,5 +1,5 @@ targets=amd64.o,arm.o,armeb.o,armel.o,dalvik.o,i386.o,i386_real.o,i486.o,i586.o,i686.o,mips.o,mipseb.o,mipsel.o,java.o,pylint.log,sparc.o,sparc64.o,template.o,tests.log,yasep.o,yasep16.o,yasep32.o -as=../src/asm-static +as=$(OBJDIR)../tools/asm-static dist=Makefile,pylint.sh,python.sh,tests.sh [amd64.o] diff --git a/tests/tests.sh b/tests/tests.sh index 3bcc031..96bdcb9 100755 --- a/tests/tests.sh +++ b/tests/tests.sh @@ -20,7 +20,7 @@ PROGNAME="tests.sh" #executables DATE="date" -DEASM="../src/deasm-static" +DEASM="${OBJDIR}../tools/deasm-static" DEBUG="_debug" diff --git a/tools/format/elf.c b/tools/format/elf.c index 374f338..6dc1c4a 100644 --- a/tools/format/elf.c +++ b/tools/format/elf.c @@ -17,3 +17,4 @@ #define format_plugin format_plugin_elf #include "../src/format/elf.c" +#include "../src/format/elf/common.c" diff --git a/tools/format/elf/elf32.c b/tools/format/elf/elf32.c new file mode 100644 index 0000000..2920c51 --- /dev/null +++ b/tools/format/elf/elf32.c @@ -0,0 +1,18 @@ +/* $Id$ */ +/* Copyright (c) 2015 Pierre Pronchery */ +/* This file is part of DeforaOS Devel Asm */ +/* This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, version 3 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . */ + + + +#include "../src/format/elf/elf32.c" diff --git a/tools/format/elf/elf64.c b/tools/format/elf/elf64.c new file mode 100644 index 0000000..549d9c9 --- /dev/null +++ b/tools/format/elf/elf64.c @@ -0,0 +1,18 @@ +/* $Id$ */ +/* Copyright (c) 2015 Pierre Pronchery */ +/* This file is part of DeforaOS Devel Asm */ +/* This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, version 3 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . */ + + + +#include "../src/format/elf/elf64.c" diff --git a/tools/project.conf b/tools/project.conf index e460226..9d6641b 100644 --- a/tools/project.conf +++ b/tools/project.conf @@ -1,17 +1,27 @@ -targets=libasm +targets=libAsm,asm-static,deasm-static cppflags_force=-I ../include -DSTANDALONE -cflags_force=-W -fPIC +cflags_force=-W `pkg-config --cflags cpp` cflags=-Wall -g -O2 +ldflags_force=`pkg-config --libs cpp` dist=Makefile -[libasm] +[libAsm] type=library -sources=arch.c,arch/amd64.c,arch/arm.c,arch/armeb.c,arch/armel.c,arch/dalvik.c,arch/i386.c,arch/i386_real.c,arch/i486.c,arch/i586.c,arch/i686.c,arch/java.c,arch/mips.c,arch/mipseb.c,arch/mipsel.c,arch/sparc.c,arch/sparc64.c,arch/yasep.c,arch/yasep16.c,arch/yasep32.c,format.c,format/dex.c,format/elf.c,format/flat.c,format/java.c,format/pe.c -cflags=`pkg-config --cflags cpp` -ldflags=../src/asm.o ../src/code.o ../src/parser.o ../src/token.o `pkg-config --libs cpp` +sources=arch.c,arch/amd64.c,arch/arm.c,arch/armeb.c,arch/armel.c,arch/dalvik.c,arch/i386.c,arch/i386_real.c,arch/i486.c,arch/i586.c,arch/i686.c,arch/java.c,arch/mips.c,arch/mipseb.c,arch/mipsel.c,arch/sparc.c,arch/sparc64.c,arch/yasep.c,arch/yasep16.c,arch/yasep32.c,format.c,format/dex.c,format/elf.c,format/elf/elf32.c,format/elf/elf64.c,format/flat.c,format/java.c,format/pe.c,../src/asm.c,../src/code.c,../src/parser.c,../src/token.c +cflags=-fPIC [arch.c] depends=../src/arch.c [format.c] depends=../src/format.c + +[asm-static] +type=binary +depends=$(OBJDIR)../src/main.o,$(OBJDIR)libAsm.a +ldflags=$(OBJDIR)../src/main.o $(OBJDIR)libAsm.a + +[deasm-static] +type=binary +depends=$(OBJDIR)../src/deasm.o,$(OBJDIR)libAsm.a +ldflags=$(OBJDIR)../src/deasm.o $(OBJDIR)libAsm.a