passgen/Makefile
2024-04-28 13:55:23 +02:00

35 lines
708 B
Makefile

TARGETS = passgen
BINARYOUT_TARGETS = passgen.o
CPPFLAGS += -I./include
CXXFLAGS += -std=c++20 -O2
ifeq ($(OS),Windows_NT)
CC = x86_64-w64-mingw32-g++
LD = x86_64-w64-mingw32-g++
EXE_EXT = .exe
else
CC = g++
LD = g++
EXE_EXT =
endif
all: $(TARGETS)$(EXE_EXT)
run:
./passgen$(EXE_EXT)
clean:
rm -f *.o *.exe $(TARGETS) $(BINARYOUT_TARGETS)
passgen.exe: passgen.o
$(LD) -static-libgcc -static-libstdc++ passgen.o -o passgen.exe
passgen: passgen.o
$(LD) passgen.o -o passgen
passgen.o: passgen.cpp ./include/pcg_random.hpp \
./include/pcg_extras.hpp ./include/pcg_uint128.hpp
$(CC) $(CPPFLAGS) $(CXXFLAGS) -c -o passgen.o passgen.cpp