annotate Makefile @ 7:be4835547dd0

clean up code, convert git files to hg, etc.
author Paper
date Fri, 16 Dec 2022 20:35:06 -0500
parents 712c7fd6702a
children 42ac054c0231
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
1 CFLAGS=-Wall -O2 -mdll -Isrc/include -I"discord_game_sdk/c"
0
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
2 ifeq ($(PROCESSOR_ARCHITECTURE),x86)
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
3 ifeq ($(PROCESSOR_ARCHITEW6432),x86)
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
4 CFLAGS += -I"/c/Program Files/Winamp SDK"
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
5 else
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
6 CFLAGS += -I"/c/Program Files (x86)/Winamp SDK"
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
7 endif
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
8 else
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
9 CFLAGS += -I"/c/Program Files (x86)/Winamp SDK"
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
10 endif
7
be4835547dd0 clean up code, convert git files to hg, etc.
Paper
parents: 2
diff changeset
11 LDFLAGS=-L"discord_game_sdk/lib/x86" -ldiscord_game_sdk -Wl,--enable-stdcall-fixup
1
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
12 DEPS=src/include/config.h src/include/dirtools.h src/include/main.h \
7
be4835547dd0 clean up code, convert git files to hg, etc.
Paper
parents: 2
diff changeset
13 src/include/timer.h src/include/resource.h src/include/utils.h
1
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
14 RC=src/include/dialog.rc
7
be4835547dd0 clean up code, convert git files to hg, etc.
Paper
parents: 2
diff changeset
15 OBJ=src/config.o src/dirtools.o src/main.o src/timer.o src/utils.o
0
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
16
1
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
17 gen_DiscordGameSDK.dll: $(OBJ) src/include/dialog.o
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
18 gcc -o $@ $(CFLAGS) $^ $(LDFLAGS)
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
19
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
20 src/include/dialog.o: src/include/dialog.rc
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
21 windres -i $< -o $@
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
22
0
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
23 src/%.o: src/%.c $(DEPS)
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
24 gcc -c $(CFLAGS) $< -o $@
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
25
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
26 clean:
2
712c7fd6702a Remove a LOT of unneeded stuff
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
27 find . -type f -name '*.o' -not -path "./discord_game_sdk/*" -delete
712c7fd6702a Remove a LOT of unneeded stuff
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
28 find . -type f -name '*.dll' -not -path "./discord_game_sdk/*" -delete