Mercurial > msvpvf
annotate Makefile @ 66:c8b91b8c2a64
prev. commit part 2
author | Paper <37962225+mrpapersonic@users.noreply.github.com> |
---|---|
date | Sun, 07 Aug 2022 03:36:22 -0400 |
parents | 83b8fdb45d5e |
children | 207684d44b54 |
rev | line source |
---|---|
64
83b8fdb45d5e
makefile: CC_FLAGS->CFLAGS
Paper <37962225+mrpapersonic@users.noreply.github.com>
parents:
55
diff
changeset
|
1 CFLAGS=-Wall -O2 -fstack-protector -fdata-sections -ffunction-sections |
83b8fdb45d5e
makefile: CC_FLAGS->CFLAGS
Paper <37962225+mrpapersonic@users.noreply.github.com>
parents:
55
diff
changeset
|
2 LDFLAGS= |
54
76698158a01a
Fix building on macOS
Paper <37962225+mrpapersonic@users.noreply.github.com>
parents:
53
diff
changeset
|
3 |
55
dbed5f51d635
Thanks, Google!
Paper <37962225+mrpapersonic@users.noreply.github.com>
parents:
54
diff
changeset
|
4 ifeq ($(shell uname -s),Darwin) # macOS is the odd one... |
64
83b8fdb45d5e
makefile: CC_FLAGS->CFLAGS
Paper <37962225+mrpapersonic@users.noreply.github.com>
parents:
55
diff
changeset
|
5 LDFLAGS+=-Wl,-dead_strip |
54
76698158a01a
Fix building on macOS
Paper <37962225+mrpapersonic@users.noreply.github.com>
parents:
53
diff
changeset
|
6 else |
64
83b8fdb45d5e
makefile: CC_FLAGS->CFLAGS
Paper <37962225+mrpapersonic@users.noreply.github.com>
parents:
55
diff
changeset
|
7 LDFLAGS+=-Wl,--gc-sections |
54
76698158a01a
Fix building on macOS
Paper <37962225+mrpapersonic@users.noreply.github.com>
parents:
53
diff
changeset
|
8 endif |
1 | 9 |
6
d1e5b8390cd3
Add Windows GUI version and a multitude of other changes
Paper <mrpapersonic@gmail.com>
parents:
3
diff
changeset
|
10 src/%.o : src/%.c |
66
c8b91b8c2a64
prev. commit part 2
Paper <37962225+mrpapersonic@users.noreply.github.com>
parents:
64
diff
changeset
|
11 $(CC) -c $(CFLAGS) $< -o $@ |
1 | 12 |
47
7cb4ca7cf257
Use a common.c file to hold concurrent functions
Paper <mrpapersonic@gmail.com>
parents:
27
diff
changeset
|
13 msvpvf: src/main.o src/common.o |
64
83b8fdb45d5e
makefile: CC_FLAGS->CFLAGS
Paper <37962225+mrpapersonic@users.noreply.github.com>
parents:
55
diff
changeset
|
14 $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) |
1 | 15 |
6
d1e5b8390cd3
Add Windows GUI version and a multitude of other changes
Paper <mrpapersonic@gmail.com>
parents:
3
diff
changeset
|
16 # GUI is windows-only, please use cross-compiler! |
47
7cb4ca7cf257
Use a common.c file to hold concurrent functions
Paper <mrpapersonic@gmail.com>
parents:
27
diff
changeset
|
17 gui: src/gui.o src/common.o |
64
83b8fdb45d5e
makefile: CC_FLAGS->CFLAGS
Paper <37962225+mrpapersonic@users.noreply.github.com>
parents:
55
diff
changeset
|
18 $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) -mwindows |
6
d1e5b8390cd3
Add Windows GUI version and a multitude of other changes
Paper <mrpapersonic@gmail.com>
parents:
3
diff
changeset
|
19 |
1 | 20 clean: |
6
d1e5b8390cd3
Add Windows GUI version and a multitude of other changes
Paper <mrpapersonic@gmail.com>
parents:
3
diff
changeset
|
21 rm -f src/*.o *.exe msvpvf gui |