[go: up one dir, main page]

File: Makefile

package info (click to toggle)
distorm3 3.4.1-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 1,392 kB
  • sloc: ansic: 11,843; python: 4,979; cs: 1,749; java: 1,478; cpp: 146; makefile: 84
file content (28 lines) | stat: -rw-r--r-- 874 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#
# diStorm3 (Mac Port)
#

DISTORM_MODE ?= DISTORM_DYNAMIC
TARGET	= libdistorm3.dylib
PYTHON_BUILD_DIR = ../../Python/macosx-x86
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	= -arch i386 -arch x86_64 -O2 -Wall -fPIC -DSUPPORT_64BIT_OFFSET -D${DISTORM_MODE}

all: clib

clean:
	/bin/rm -rf ../../src/*.o ${TARGET} ../../libdistorm3.dylib ../../distorm3.a  ../../*.a

clib: ${COBJS}
ifeq '$(DISTORM_MODE)' 'DISTORM_DYNAMIC'
	${CC} ${CFLAGS} ${VERSION} ${COBJS} -fPIC -dynamiclib -o ${TARGET}
	[ -d ${PYTHON_BUILD_DIR} ] && rm -rf ${PYTHON_BUILD_DIR} || true
	mkdir ${PYTHON_BUILD_DIR}
	cp ${TARGET} ${PYTHON_BUILD_DIR}/
else
	ar rs ../../distorm3.a ${COBJS}
endif

.c.o:
	${CC} ${CFLAGS} ${VERSION} -c $< -o $@