spigotcpp/Makefile.win
A.M. Rowsell bc12d981d0
Link Windows exe statically, change location of std::flush
The Windows exe has to be linked statically, because Windows
is stupid and doesn't have dynamic libraries like the stdc++ lib
available. Maybe it's in some .dll somewhere, but I can't be
bothered. Linux is just better.

The change to the location of flush will make the output look
more "spigot"-like, ie with large numbers of digits generated,
the digits will be output in small groups instead of a nice
smooth digit at a time. For some reason this is how most
spigot algorithms do it, and so to me it "looks" correct. It
doesn't actually change anything whatsoever other than when
the standard output actually gets printed to console.
2023-06-20 17:55:09 -04:00

31 lines
473 B
Makefile

CC=x86_64-w64-mingw32-gcc
CXX=x86_64-w64-mingw32-g++
RM=rm -f
CPPFLAGS=-Wall
LDFLAGS=-static
LDLIBS=-lm
SRCS=main.cpp Spigot.cpp
OBJS=$(subst .cpp,.o,$(SRCS))
all: main
debug: $(OBJS)
$(CXX) $(LDFLAGS) -ggdb -O0 -o main $(OBJS) $(LDLIBS)
main: $(OBJS)
$(CXX) $(LDFLAGS) -O3 -o main $(OBJS) $(LDLIBS)
depend: .depend
.depend: $(SRCS)
$(RM) ./.depend
$(CXX) $(CPPFLAGS) -MM $^ >> ./.depend
clean:
$(RM) $(OBJS)
distclean: clean
$(RM) *~ .depend
include .depend