--- make/linux/Makefile.orig 2011-05-03 09:49:41.000000000 -0400 +++ make/linux/Makefile 2011-05-03 09:50:17.000000000 -0400 @@ -4,22 +4,23 @@ TARGET = libdistorm3.so COBJS = ../../src/mnemonics.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 -CC = gcc -CFLAGS = -fPIC -O2 -Wall -DSUPPORT_64BIT_OFFSET -DDISTORM_STATIC +CFLAGS += -DSUPPORT_64BIT_OFFSET all: clib clean: - /bin/rm -rf ../../src/*.o ${TARGET} ../../distorm3.a ./../*.o + /bin/rm -rf ../../src/*.o ../../distorm3.a ./../*.o clib: ${COBJS} - ${CC} ${CFLAGS} ${VERSION} ${COBJS} -shared -o ${TARGET} - ar rs ../../distorm3.a ${COBJS} + ${CC} ${CFLAGS} ${LDFLAGS} ${EXTRAFLAGS} ${VERSION} ${COBJS} -shared -o ${TARGET} + +staticlib: ${COBJS} + ${AR} rs libdistorm3.a ${COBJS} install: libdistorm3.so install -s ${TARGET} /usr/local/lib @echo "... running ldconfig might be smart ..." .c.o: - ${CC} ${CFLAGS} ${VERSION} -c $< -o $@ + ${CC} ${CFLAGS} ${EXTRAFLAGS} ${VERSION} -c $< -o $@