Skip to content

Commit

Permalink
WINCON/WINGUI: Added support for LLVM; enabled custon CFLAGS; Support…
Browse files Browse the repository at this point in the history
… for cross compilation for Windows on Arm.
  • Loading branch information
okibcn committed Mar 4, 2023
1 parent bfb6e33 commit 158e8ae
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
17 changes: 10 additions & 7 deletions wincon/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# GNU MAKE Makefile for PDCurses library - WIN32 MinGW GCC
# GNU MAKE Makefile for PDCurses library - WIN32/64/ARM MinGW GCC/LLVM
#
# Usage: [g]make [-f path\Makefile] [DEBUG=Y] [DLL=Y] [WIDE=Y] [UTF8=Y]
# [INFOEX=N] [LIBNAME=(name)] [DLLNAME=(name)] [target]
# [_w32=Y | _w64=Y | _a64=Y ]
#
# where target can be any of:
# [all|demos|pdcurses.a|testcurs.exe...]
Expand Down Expand Up @@ -55,21 +56,23 @@ endif
# Only decision is: are we doing a 64-bit compile (_w64 defined)?

ifndef ON_WINDOWS
PREFIX = i686-w64-mingw32-
ifdef _w64
PREFIX = x86_64-w64-mingw32-
else
PREFIX = i686-w64-mingw32-
PREFIX = x86_64-w64-mingw32-
endif
ifdef _a64
PREFIX = aarch64-w64-mingw32-
endif
endif

PDCURSES_WIN_H = $(osdir)/pdcwin.h

CC = $(PREFIX)gcc

AR = ar
STRIP = strip
AR = $(PREFIX)ar
STRIP = $(PREFIX)strip

CFLAGS = -Wall -Wextra -pedantic
CFLAGS += -Wall -Wextra -pedantic
ifeq ($(DEBUG),Y)
CFLAGS += -g -DPDCDEBUG
LDFLAGS = -g
Expand Down
19 changes: 11 additions & 8 deletions wingui/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# GNU MAKE Makefile for PDCurses library - WIN32 MinGW GCC WinGUI
# GNU MAKE Makefile for PDCurses library - WIN32/64/ARM MinGW GCC/LLVM
#
# Usage: [g]make [-f path\Makefile] [DEBUG=Y] [DLL=Y] [WIDE=Y] [UTF8=Y]
# [LIBNAME=(name)] [DLLNAME=(name)] [target]
# [INFOEX=N] [LIBNAME=(name)] [DLLNAME=(name)] [target]
# [_w32=Y | _w64=Y | _a64=Y ]
#
# where target can be any of:
# [all|demos|pdcurses.a|testcurs.exe...]
Expand Down Expand Up @@ -55,21 +56,23 @@ endif
# Only decision is: are we doing a 64-bit compile (_w64 defined)?

ifndef ON_WINDOWS
PREFIX = i686-w64-mingw32-
ifdef _w64
PREFIX = x86_64-w64-mingw32-
else
PREFIX = i686-w64-mingw32-
PREFIX = x86_64-w64-mingw32-
endif
ifdef _a64
PREFIX = aarch64-w64-mingw32-
endif
endif

PDCURSES_WIN_H = $(osdir)/pdcwin.h

CC = $(PREFIX)gcc

AR = ar
STRIP = strip
AR = $(PREFIX)ar
STRIP = $(PREFIX)strip

CFLAGS = -Wall -Wextra -pedantic
CFLAGS += -Wall -Wextra -pedantic
ifeq ($(DEBUG),Y)
CFLAGS += -g -DPDCDEBUG
LDFLAGS = -g
Expand Down

0 comments on commit 158e8ae

Please sign in to comment.