Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
UNAMEOS = $(shell uname)

COMMON_CFLAGS= -Wall -Wextra -ggdb -std=c99 -pedantic -Ithirdparty -Ibuild -DPENGER
SDL2_CFLAGS= `pkg-config --cflags sdl2` $(COMMON_CFLAGS)
RGFW_CFLAGS= $(COMMON_CFLAGS)
COMMON_LIBS= -lm
SDL2_LIBS= `pkg-config --libs sdl2` $(COMMON_LIBS)
ifeq ($(UNAMEOS),Darwin)
Expand All @@ -17,10 +15,10 @@ INSTALL?= install
all: Makefile sowon sowon_rgfw man

sowon_rgfw: src/main_rgfw.c build/digits.h build/penger_walk_sheet.h
$(CC) $(RGFW_CFLAGS) -o sowon_rgfw src/main_rgfw.c $(RGFW_LIBS)
$(CC) $(COMMON_CFLAGS) -o sowon_rgfw src/main_rgfw.c $(RGFW_LIBS)

sowon: src/main.c build/digits.h build/penger_walk_sheet.h
$(CC) $(SDL2_CFLAGS) -o sowon src/main.c $(SDL2_LIBS)
$(CC) $(COMMON_CFLAGS) -o sowon src/main.c $(SDL2_LIBS)

build/digits.h: build/png2c ./assets/digits.png
./build/png2c ./assets/digits.png digits > build/digits.h
Expand Down
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@

Dependencies: [SDL2](https://www.libsdl.org/download-2.0.php)

### Fedora 42+
Starting with Fedora 42, the native SDL2 library is no longer available.
It was replaced by the SDL3 library. For programs that still require SDL2,
an [`sdl2-compat`](https://github.com/libsdl-org/sdl2-compat) library,
which provids a compatibility layer over SDL3, was introduced.
```console
$ sudo dnf install sdl2-compat-devel libXi-devel libXrandr-devel
$ make
$ ./sowon
```

### Debian
```console
$ sudo apt-get install libsdl2-dev
Expand Down Expand Up @@ -57,7 +68,7 @@ $ ./sowon
| Key | Description |
| --- | --- |
| <kbd>SPACE</kbd> | Toggle pause |
| <kbd>=</kbd> | Zoom in |
| <kbd>=</kbd> or <kbd>+</kbd> | Zoom in |
| <kbd>-</kbd> | Zoom out |
| <kbd>0</kbd> | Zoom 100% |
| <kbd>F5</kbd> | Restart |
Expand Down
4 changes: 2 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <string.h>
#include <time.h>

#include <SDL.h>
#include <SDL2/SDL.h>

#include "common.c"

Expand Down Expand Up @@ -115,7 +115,7 @@ void render_penger_at(SDL_Renderer *renderer, SDL_Texture *penger, float time, i
}
#endif

int main(int argc, char **argv)
int main(int argc, char *argv[])
{
State state = {0};
parse_state_from_args(&state, argc, argv);
Expand Down