Files
Tyler Wilding bfc4c18ada goalc: replicate tests for the majority of ARM64 non-simd cases (#4377)
- Adds `capstone` as a disassembling library that could eventually
replace Zydis (for now left that alone)
- Replicates all of the existing x86 tests to ARM64, fixed a bunch of
underlying issues along the way
- There are a very small handful of tests remaining that need to be
enabled / fixed
2026-08-16 15:34:37 -04:00

50 lines
920 B
Makefile
Vendored
Generated

# Makefile for Cstool of Capstone Disassembly Engine
include ../functions.mk
.PHONY: clean all
LIBNAME = capstone
CFLAGS += -I../include -I.
CFLAGS += -std=gnu99
LDFLAGS += -O3 -Wall -L.. -l$(LIBNAME)
TARGET = cstool
SOURCES := $(wildcard *.c)
OBJECTS := $(SOURCES:.c=.o)
LIBCAPSTONE = libcapstone.a
IS_CYGWIN := $(shell $(CC) -dumpmachine 2>/dev/null | grep -i cygwin | wc -l)
ifeq ($(IS_CYGWIN),1)
LIBCAPSTONE = capstone.lib
else
IS_MINGW := $(shell $(CC) --version 2>/dev/null | grep -i "\(mingw\|MSYS\)" | wc -l)
ifeq ($(IS_MINGW),1)
LIBCAPSTONE = capstone.lib
endif
endif
all: $(TARGET)
$(TARGET): ../$(LIBCAPSTONE) $(OBJECTS)
ifeq ($(V), 0)
$(call log,LINK,$@)
@${CC} $(OBJECTS) $(LDFLAGS) -o $@
else
${CC} $(OBJECTS) $(LDFLAGS) -o $@
endif
clean:
${RM} -rf *.o $(TARGET)
${RM} -f *.d
%.o: %.c
ifeq ($(V), 0)
$(call log,CC,$@)
@${CC} $(CFLAGS) -c $< -o $@
else
${CC} $(CFLAGS) -c $< -o $@
endif