53 lines
1.6 KiB
Makefile
53 lines
1.6 KiB
Makefile
|
# 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 <https://www.gnu.org/licenses/>.
|
||
|
|
||
|
.PHONY: all clean
|
||
|
|
||
|
APP_NAME=run
|
||
|
RKT_NAME=$(APP_NAME).rkt
|
||
|
|
||
|
MONOCYPHER_INC=/usr/include/monocypher
|
||
|
|
||
|
####################################################################################################
|
||
|
|
||
|
LIBS=-ldl -lm
|
||
|
# for musl
|
||
|
#LIBS=-lffi -lucontext
|
||
|
|
||
|
all: $(APP_NAME)
|
||
|
|
||
|
# main build
|
||
|
$(APP_NAME): main_bc.c app.o monocypher.o monocypher-ed25519.o
|
||
|
$(CC) -o $@ -pipe -fPIC -O3 -DAPP_NAME='"$(APP_NAME)"' -I$(MONOCYPHER_INC) -static $^ \
|
||
|
-lracket3m -lrktio $(LIBS)
|
||
|
|
||
|
monocypher.o: $(MONOCYPHER_INC)/monocypher.c
|
||
|
$(CC) -o $@ -pipe -fPIC -O3 -I$(MONOCYPHER_INC) -c $^
|
||
|
monocypher-ed25519.o: $(MONOCYPHER_INC)/monocypher-ed25519.c
|
||
|
$(CC) -o $@ -pipe -fPIC -O3 -I$(MONOCYPHER_INC) -c $^
|
||
|
|
||
|
# this is faster than --c-mods by a lot
|
||
|
# it's less portable but like, we're containerized already so it'll work
|
||
|
app.o: app.zo
|
||
|
$(LD) -r -b binary $< -o $@
|
||
|
|
||
|
app.zo: $(RKT_NAME)
|
||
|
raco ctool --mods $@ $<
|
||
|
|
||
|
clean:
|
||
|
$(RM) $(APP_NAME) *.zo *.o
|