annotate Makefile @ 11:e6a594f16403

*: huge refactor the config file has changed drastically, moving to an ini file from that custom format; i *would* have used the win32 functions for those, but they were barely functional, so I decided on using ini.h which is lightweight enough. additionally, I've added Deezer support so album art will be displayed! unfortunately though winhttp is a pain in the ass so if I send a request with any form of unicode chars in it it just returns a "bad request" error. I've tried debugging this but I could never really come up with anything: my hypothesis is that deezer expects their characters in percent-encoded UTF-8, but winhttp is sending them in some other encoding. the config dialog was moved out of config.c (overdue) and many more options are given in the config as well. main.c has been renamed to plugin.c to better differentiate it from... everything else.
author Paper <paper@paper.us.eu.org>
date Thu, 14 Mar 2024 20:25:37 -0400
parents 42ac054c0231
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents: 10
diff changeset
1 CFLAGS=-flto -Wall -O2 -mdll -Iinclude -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
11
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents: 10
diff changeset
11 LDFLAGS=-L"discord_game_sdk/lib/x86" -lwinhttp -lshlwapi -ldiscord_game_sdk -Wl,--enable-stdcall-fixup
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents: 10
diff changeset
12 DEPS=include/config.h include/dirtools.h include/json.h \
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents: 10
diff changeset
13 include/resource.h include/timer.h include/utils.h \
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents: 10
diff changeset
14 include/dialog/dlg_config.h include/ini.h
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents: 10
diff changeset
15 OBJ=src/config.o src/dirtools.o src/plugin.o src/timer.o src/utils.o \
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents: 10
diff changeset
16 src/dialog.o src/deezer.o src/json.o src/dialog/dlg_config.o \
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents: 10
diff changeset
17 src/ini.o
10
42ac054c0231 *: huge refactoring
Paper <paper@paper.us.eu.org>
parents: 7
diff changeset
18 .SUFFIXES: .rc
0
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
19
10
42ac054c0231 *: huge refactoring
Paper <paper@paper.us.eu.org>
parents: 7
diff changeset
20 gen_DiscordGameSDK.dll: $(OBJ) $(DEPS)
42ac054c0231 *: huge refactoring
Paper <paper@paper.us.eu.org>
parents: 7
diff changeset
21 $(CC) -o $@ $(CFLAGS) $(OBJ) $(LDFLAGS)
1
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
22
10
42ac054c0231 *: huge refactoring
Paper <paper@paper.us.eu.org>
parents: 7
diff changeset
23 .rc.o:
11
e6a594f16403 *: huge refactor
Paper <paper@paper.us.eu.org>
parents: 10
diff changeset
24 windres -Iinclude -i $< -o $@
1
7abb5d8b20ea Initial commit: part 2
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
25
10
42ac054c0231 *: huge refactoring
Paper <paper@paper.us.eu.org>
parents: 7
diff changeset
26 .c.o:
42ac054c0231 *: huge refactoring
Paper <paper@paper.us.eu.org>
parents: 7
diff changeset
27 $(CC) -c $(CFLAGS) $< -o $@
0
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
28
d91dfd53b8b4 Initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
29 clean:
10
42ac054c0231 *: huge refactoring
Paper <paper@paper.us.eu.org>
parents: 7
diff changeset
30 rm gen_DiscordGameSDK.dll $(OBJ)