Mercurial > msvpvf
comparison Makefile @ 64:83b8fdb45d5e
makefile: CC_FLAGS->CFLAGS
author | Paper <37962225+mrpapersonic@users.noreply.github.com> |
---|---|
date | Fri, 05 Aug 2022 23:46:44 -0400 |
parents | dbed5f51d635 |
children | c8b91b8c2a64 |
comparison
equal
deleted
inserted
replaced
63:a2e979245441 | 64:83b8fdb45d5e |
---|---|
1 CC_FLAGS=-Wall -O2 -fstack-protector -fdata-sections -ffunction-sections | 1 CFLAGS=-Wall -O2 -fstack-protector -fdata-sections -ffunction-sections |
2 LD_FLAGS= | 2 LDFLAGS= |
3 | 3 |
4 ifeq ($(shell uname -s),Darwin) # macOS is the odd one... | 4 ifeq ($(shell uname -s),Darwin) # macOS is the odd one... |
5 LD_FLAGS+=-Wl,-dead_strip | 5 LDFLAGS+=-Wl,-dead_strip |
6 else | 6 else |
7 LD_FLAGS+=-Wl,--gc-sections | 7 LDFLAGS+=-Wl,--gc-sections |
8 endif | 8 endif |
9 | 9 |
10 src/%.o : src/%.c | 10 src/%.o : src/%.c |
11 $(CC) -c $(CC_FLAGS) $< -o $@ | 11 $(CC) -c $(CC_FLAGS) $< -o $@ |
12 | 12 |
13 msvpvf: src/main.o src/common.o | 13 msvpvf: src/main.o src/common.o |
14 $(CC) $(CC_FLAGS) -o $@ $^ $(LD_FLAGS) | 14 $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) |
15 | 15 |
16 # GUI is windows-only, please use cross-compiler! | 16 # GUI is windows-only, please use cross-compiler! |
17 gui: src/gui.o src/common.o | 17 gui: src/gui.o src/common.o |
18 $(CC) $(CC_FLAGS) -o $@ $^ $(LD_FLAGS) -mwindows | 18 $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) -mwindows |
19 | 19 |
20 clean: | 20 clean: |
21 rm -f src/*.o *.exe msvpvf gui | 21 rm -f src/*.o *.exe msvpvf gui |