diff options
author | Nicholas Tay <nick@windblume.net> | 2024-04-06 21:11:37 +1100 |
---|---|---|
committer | Nicholas Tay <nick@windblume.net> | 2024-04-06 21:12:12 +1100 |
commit | 4bb135bc104adcef1bea79726b8a6e5d6c73449f (patch) | |
tree | 7dae7ce6b92e30640473b71984b6e6f0daa41cf7 /Makefile | |
parent | db24e6bfa08f9745c80d16541832f28e664becf6 (diff) | |
download | passgen-4bb135bc104adcef1bea79726b8a6e5d6c73449f.tar.gz passgen-4bb135bc104adcef1bea79726b8a6e5d6c73449f.tar.bz2 passgen-4bb135bc104adcef1bea79726b8a6e5d6c73449f.zip |
Support win32 mingw cross-compile in make
Required a slight mod to Windows.h to be lower case so it works on Linux
mingw. Turns out it's case-insensitive on Windows MSVC/MSYS.
Diffstat (limited to '')
-rw-r--r-- | Makefile | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -4,11 +4,16 @@ PREFIX = $(HOME)/.local CC = gcc CFLAGS += -std=c99 -Wall -Wextra -Wshadow -pedantic +CC_WIN32 = i686-w64-mingw32-gcc + default: $(NAME) $(NAME): $(NAME).c config.h $(CC) $(CFLAGS) -o $(NAME) $(NAME).c +$(NAME).exe: $(NAME).c config.h + $(CC_WIN32) $(CFLAGS) -o $(NAME).exe $(NAME).c + install: $(NAME) install -d $(DESTDIR)$(PREFIX)/bin/ install -m 755 $(NAME) $(DESTDIR)$(PREFIX)/bin/ |