Mercurial > msvpvf
comparison 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 |
comparison
equal
deleted
inserted
replaced
78:fae1d67d8cfd | 79:8f90d5addda9 |
---|---|
1 CFLAGS=-Wall -O2 -fstack-protector -fdata-sections -ffunction-sections | 1 _CFLAGS = -Wall -O2 -Iinclude $(CFLAGS) |
2 LDFLAGS= | 2 _LDFLAGS = $(LDFLAGS) |
3 | 3 |
4 ifeq ($(shell uname -s),Darwin) # macOS is the odd one... | 4 .c.o: |
5 LDFLAGS+=-Wl,-dead_strip | 5 $(CC) -c $(_CFLAGS) $< -o $@ |
6 else | |
7 LDFLAGS+=-Wl,--gc-sections | |
8 endif | |
9 | 6 |
10 src/%.o : src/%.c | 7 # this is a unix-like version, barely functional on windows. |
11 $(CC) -c $(CFLAGS) $< -o $@ | 8 msvpvf: src/main.o src/common.o |
9 $(CC) $(_CFLAGS) -o $@ $^ $(_LDFLAGS) | |
12 | 10 |
13 msvpvf: src/main.o src/common.o | 11 # windows-specific |
14 $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) | |
15 | |
16 # GUI is windows-only, please use cross-compiler! | |
17 gui: src/gui.o src/common.o | 12 gui: src/gui.o src/common.o |
18 $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) -mwindows -lshlwapi | 13 $(CC) -o $@ $^ -mwindows -lole32 -lshlwapi -luuid -lmsvcrt $(_LDFLAGS) |
19 | 14 |
20 clean: | 15 clean: |
21 rm -f src/*.o *.exe msvpvf gui | 16 rm -f src/main.o src/common.o src/gui.o msvpvf gui |