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
|
||||
TARGETS = libasm.a libasm.so asm deasm
|
||||
TARGETS = libasm.a libasm.so asm asm-static deasm
|
||||
PREFIX = /usr/local
|
||||
DESTDIR =
|
||||
LIBDIR = $(PREFIX)/lib
|
||||
@ -41,6 +41,11 @@ asm_LDFLAGS = $(LDFLAGSF) $(LDFLAGS) -L. -Wl,-rpath,$(LIBDIR) -lasm
|
||||
|
||||
asm: $(asm_OBJS) libasm.so
|
||||
$(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_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS)
|
||||
@ -75,11 +80,11 @@ deasm.o: deasm.c ../include/Asm.h
|
||||
|
||||
clean:
|
||||
@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:
|
||||
@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)
|
||||
|
||||
install: $(TARGETS)
|
||||
|
@ -1,5 +1,5 @@
|
||||
subdirs=arch,format
|
||||
targets=libasm,asm,deasm
|
||||
targets=libasm,asm,asm-static,deasm
|
||||
cppflags_force=-I ../include
|
||||
cppflags=
|
||||
cflags_force=-W `pkg-config --cflags cpp`
|
||||
@ -21,6 +21,11 @@ depends=libasm.so
|
||||
ldflags=-L. -Wl,-rpath,$(LIBDIR) -lasm
|
||||
install=$(BINDIR)
|
||||
|
||||
[asm-static]
|
||||
type=binary
|
||||
depends=main.o,libasm.a
|
||||
ldflags=`pkg-config --libs cpp` main.o libasm.a
|
||||
|
||||
[deasm]
|
||||
type=binary
|
||||
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
|
||||
DESTDIR =
|
||||
BINDIR = $(PREFIX)/bin
|
||||
AS = ../src/asm
|
||||
AS = ../src/asm-static
|
||||
ASFLAGS =
|
||||
RM = rm -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
|
||||
as=../src/asm
|
||||
as=../src/asm-static
|
||||
dist=Makefile
|
||||
|
||||
[amd64.o]
|
||||
|
Loading…
Reference in New Issue
Block a user