Build a statically-linked version of asm for tests
This commit is contained in:
parent
dc35c51e55
commit
6870bbd088
11
src/Makefile
11
src/Makefile
@ -1,5 +1,5 @@
|
|||||||
SUBDIRS = arch format
|
SUBDIRS = arch format
|
||||||
TARGETS = libasm.a libasm.so asm deasm
|
TARGETS = libasm.a libasm.so asm asm-static deasm
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
DESTDIR =
|
DESTDIR =
|
||||||
LIBDIR = $(PREFIX)/lib
|
LIBDIR = $(PREFIX)/lib
|
||||||
@ -41,6 +41,11 @@ asm_LDFLAGS = $(LDFLAGSF) $(LDFLAGS) -L. -Wl,-rpath,$(LIBDIR) -lasm
|
|||||||
|
|
||||||
asm: $(asm_OBJS) libasm.so
|
asm: $(asm_OBJS) libasm.so
|
||||||
$(CC) -o asm $(asm_OBJS) $(asm_LDFLAGS)
|
$(CC) -o asm $(asm_OBJS) $(asm_LDFLAGS)
|
||||||
|
asm-static_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS)
|
||||||
|
asm-static_LDFLAGS = $(LDFLAGSF) $(LDFLAGS) `pkg-config --libs cpp` main.o libasm.a
|
||||||
|
|
||||||
|
asm-static: $(asm-static_OBJS) main.o libasm.a
|
||||||
|
$(CC) -o asm-static $(asm-static_OBJS) $(asm-static_LDFLAGS)
|
||||||
|
|
||||||
deasm_OBJS = deasm.o
|
deasm_OBJS = deasm.o
|
||||||
deasm_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS)
|
deasm_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS)
|
||||||
@ -75,11 +80,11 @@ deasm.o: deasm.c ../include/Asm.h
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
@for i in $(SUBDIRS); do (cd $$i && $(MAKE) clean) || exit; done
|
@for i in $(SUBDIRS); do (cd $$i && $(MAKE) clean) || exit; done
|
||||||
$(RM) -- $(libasm_OBJS) $(asm_OBJS) $(deasm_OBJS)
|
$(RM) -- $(libasm_OBJS) $(asm_OBJS) $(asm-static_OBJS) $(deasm_OBJS)
|
||||||
|
|
||||||
distclean:
|
distclean:
|
||||||
@for i in $(SUBDIRS); do (cd $$i && $(MAKE) distclean) || exit; done
|
@for i in $(SUBDIRS); do (cd $$i && $(MAKE) distclean) || exit; done
|
||||||
$(RM) -- $(libasm_OBJS) $(asm_OBJS) $(deasm_OBJS)
|
$(RM) -- $(libasm_OBJS) $(asm_OBJS) $(asm-static_OBJS) $(deasm_OBJS)
|
||||||
$(RM) -- $(TARGETS)
|
$(RM) -- $(TARGETS)
|
||||||
|
|
||||||
install: $(TARGETS)
|
install: $(TARGETS)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
subdirs=arch,format
|
subdirs=arch,format
|
||||||
targets=libasm,asm,deasm
|
targets=libasm,asm,asm-static,deasm
|
||||||
cppflags_force=-I ../include
|
cppflags_force=-I ../include
|
||||||
cppflags=
|
cppflags=
|
||||||
cflags_force=-W `pkg-config --cflags cpp`
|
cflags_force=-W `pkg-config --cflags cpp`
|
||||||
@ -21,6 +21,11 @@ depends=libasm.so
|
|||||||
ldflags=-L. -Wl,-rpath,$(LIBDIR) -lasm
|
ldflags=-L. -Wl,-rpath,$(LIBDIR) -lasm
|
||||||
install=$(BINDIR)
|
install=$(BINDIR)
|
||||||
|
|
||||||
|
[asm-static]
|
||||||
|
type=binary
|
||||||
|
depends=main.o,libasm.a
|
||||||
|
ldflags=`pkg-config --libs cpp` main.o libasm.a
|
||||||
|
|
||||||
[deasm]
|
[deasm]
|
||||||
type=binary
|
type=binary
|
||||||
sources=deasm.c
|
sources=deasm.c
|
||||||
|
@ -2,7 +2,7 @@ TARGETS = amd64.o dalvik.o i386.o i386_real.o i486.o i586.o i686.o java.o sparc.
|
|||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
DESTDIR =
|
DESTDIR =
|
||||||
BINDIR = $(PREFIX)/bin
|
BINDIR = $(PREFIX)/bin
|
||||||
AS = ../src/asm
|
AS = ../src/asm-static
|
||||||
ASFLAGS =
|
ASFLAGS =
|
||||||
RM = rm -f
|
RM = rm -f
|
||||||
LN = ln -f
|
LN = ln -f
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
targets=amd64.o,dalvik.o,i386.o,i386_real.o,i486.o,i586.o,i686.o,java.o,sparc.o,sparc64.o
|
targets=amd64.o,dalvik.o,i386.o,i386_real.o,i486.o,i586.o,i686.o,java.o,sparc.o,sparc64.o
|
||||||
as=../src/asm
|
as=../src/asm-static
|
||||||
dist=Makefile
|
dist=Makefile
|
||||||
|
|
||||||
[amd64.o]
|
[amd64.o]
|
||||||
|
Loading…
Reference in New Issue
Block a user