ifneq ($(UNAME_M),aarch64) ifneq ($(UNAME_M),arm64) CFLAGS := $(CFLAGS) endif endif ifneq ($(UNAME_M),aarch64) ifneq ($(UNAME_M),arm64) ASMFLAGS := $(ASMFLAGS) endif endif CFLAGS := $(CFLAGS) -D ="" INCLUDEFLAGS := $(INCLUDEFLAGS) -I HEADERS := $(HEADERS) SOURCES := $(SOURCES) INCLUDES := $(INCLUDES) SOURCES := $(SOURCES) SOURCES := $(SOURCES) $(BINDIR)/ .o : $(HEADERS) $(INCLUDES) $(CC) $(INCLUDEFLAGS) $(ASMFLAGS) $(CC) $(INCLUDEFLAGS) $(CFLAGS) -c $< -o $@ OBJECTS := $(OBJECTS) all: : .pack: BINDIR = bin/.build/ $(BINDIR): mkdir -p $(BINDIR) MAKE ?= gmake CC ?= gcc AR = ar UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Linux) ASMFLAGS := endif ifeq ($(UNAME_S),Darwin) ASMFLAGS := -x assembler-with-cpp -Wa,-defsym,old_gas_syntax=1 -Wa,-defsym,no_plt=1 endif ifneq (,$(findstring mingw32,$(CC))) ASMFLAGS := -x assembler-with-cpp -Wa,-defsym,old_gas_syntax=1 -Wa,-defsym,no_plt=1 endif UNAME_M := $(shell uname -m) CFLAGS := $(CFLAGS) -fpic HEADERS := $(HEADERS) SOURCES := $(SOURCES) INCLUDEFLAGS := $(INCLUDEFLAGS) -I bin/ : $(BINDIR) $(OBJECTS) mkdir -p $(dir $@) mkdir -p $@.headers cp -f $(HEADERS) $@.headers/ $(AR) rcsv $@ $(OBJECTS) mkdir -p $@.headers cp -f $(HEADERS) $@.headers/ $(CC) -shared -o $@ $(OBJECTS) $(CFLAGS) mkdir -p $@.headers cp -f $(HEADERS) $@.headers/ $(CC) -dynamiclib -install_name @rpath/ $(OBJECTS) -o $@ $(CC) -o $@ $(OBJECTS) $(CFLAGS) : $(SOURCES) mkdir -p bin/.pack/ rm -rf bin/.pack/ /* cp $(SOURCES) bin/.pack/ / cd bin/.pack/ ; tar -czf /*