--- build/linux/Makefile +++ build/linux/Makefile @@ -6,7 +6,7 @@ COBJS = ../../src/x86defs.o ../../src/wstring.o ../../src/textdefs.o ../../src/prefix.o ../../src/operands.o ../../src/insts.o ../../src/instructions.o ../../src/distorm.o ../../src/decoder.o PYOBJS = ../../src/x86defs.o ../../src/wstring.o ../../src/textdefs.o ../../src/pydistorm.o ../../src/prefix.o ../../src/operands.o ../../src/insts.o ../../src/instructions.o ../../src/decoder.o CC = gcc -CFLAGS = -O2 -Wall -fPIC -DSUPPORT_64BIT_OFFSET -D_DLL +CFLAGS += -Wall -fPIC -DSUPPORT_64BIT_OFFSET -D_DLL all: clib py @@ -14,11 +14,11 @@ /bin/rm -rf ../../src/*.o ${TARGET} ../../distorm64.a clib: ${COBJS} - ${CC} ${CFLAGS} ${VERSION} ${COBJS} -fPIC -shared -o ${TARGET} + ${CC} ${LDFLAGS} ${VERSION} ${COBJS} -fPIC -shared -o ${TARGET} ar rs ../../distorm64.a ${COBJS} py: ${PYOBJS} - ${CC} ${CFLAGS} ${VERSION} ${PYOBJS} -fPIC -shared -o ${TARGET} + ${CC} ${LDFLAGS} ${VERSION} ${PYOBJS} -fPIC -shared -o ${TARGET} install: libdistorm64.so install -s ${TARGET} /usr/local/lib --- linuxproj/Makefile +++ linuxproj/Makefile @@ -4,12 +4,12 @@ TARGET = disasm CC = gcc -CFLAGS = -Wall -O2 -I. -o +CFLAGS += -Wall -I. all: disasm disasm: - ${CC} ${CFLAGS} ${TARGET} main.c ../distorm64.a + ${CC} ${CFLAGS} ${LDFLAGS} -o ${TARGET} main.c ../distorm64.a clean: /bin/rm -rf *.o ${TARGET}