# crossfire: distributed brute force infrastructure # # Copyright (C) 2020 haskal # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . .PHONY: all clean mrproper APP_NAME=crossfire-agent RKT_NAME=$(APP_NAME).rkt MONOCYPHER_VERSION=3.1.1 RACKET_VERSION=7.9 TARGET_ARCH=$(shell $(CC) -dumpmachine) #################################################################################################### ARCH_DIR=arch_$(TARGET_ARCH) APP_CFLAGS=-pipe -fPIC -O3 -DAPP_NAME='"$(APP_NAME)"' -DAPP_ARCH='"$(TARGET_ARCH)"' APP_LDFLAGS=-static -ldl -lm -lpthread # musl needs -lucontext all: $(ARCH_DIR)/$(APP_NAME) include dependencies.mk # main build $(ARCH_DIR)/$(APP_NAME): main_bc.c app.o vnd-deps [ -d $(ARCH_DIR) ] || mkdir -p $(ARCH_DIR) $(CC) -o $@ $(APP_CFLAGS) $(VND_CFLAGS) main_bc.c app.o \ $(VND_LDFLAGS) $(APP_LDFLAGS) # this is faster than --c-mods by a lot # it's potentially less portable but works on GNU ld and probably lld too app.o: app.zo $(LD) -r -b binary $< -o $@ app.zo: $(RKT_NAME) raco ctool --mods $@ $< clean: $(RM) $(ARCH_DIR)/$(APP_NAME) *.zo *.o mrproper: clean