Mercurial > msvpvf
diff Makefile @ 79:8f90d5addda9 v2.0
*: refactor... basically everything!
The Win32 GUI version is now unicode-friendly. HOWEVER, ANSI still very
much works. you can configure which version to use through `-DUNICODE=0/1`
in CFLAGS.
the CLI is also friendlier and uses a more sane interface as well.
note: the command line flags (which were optional before) are now required.
Unicode filenames will not work on Windows because Windows sucks.
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Wed, 20 Mar 2024 17:06:26 -0400 |
parents | 207684d44b54 |
children | c06dcab17923 |
line wrap: on
line diff
--- a/Makefile Sun Oct 01 03:03:29 2023 -0400 +++ b/Makefile Wed Mar 20 17:06:26 2024 -0400 @@ -1,21 +1,16 @@ -CFLAGS=-Wall -O2 -fstack-protector -fdata-sections -ffunction-sections -LDFLAGS= +_CFLAGS = -Wall -O2 -Iinclude $(CFLAGS) +_LDFLAGS = $(LDFLAGS) -ifeq ($(shell uname -s),Darwin) # macOS is the odd one... - LDFLAGS+=-Wl,-dead_strip -else - LDFLAGS+=-Wl,--gc-sections -endif +.c.o: + $(CC) -c $(_CFLAGS) $< -o $@ -src/%.o : src/%.c - $(CC) -c $(CFLAGS) $< -o $@ - +# this is a unix-like version, barely functional on windows. msvpvf: src/main.o src/common.o - $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) + $(CC) $(_CFLAGS) -o $@ $^ $(_LDFLAGS) -# GUI is windows-only, please use cross-compiler! +# windows-specific gui: src/gui.o src/common.o - $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) -mwindows -lshlwapi + $(CC) -o $@ $^ -mwindows -lole32 -lshlwapi -luuid -lmsvcrt $(_LDFLAGS) clean: - rm -f src/*.o *.exe msvpvf gui + rm -f src/main.o src/common.o src/gui.o msvpvf gui