Makefile (1182B)
- WAYLAND_PROTOCOLS=`pkg-config --variable=pkgdatadir wayland-protocols`
- WAYLAND_SCANNER=`pkg-config --variable=wayland_scanner wayland-scanner`
- CFLAGS=-Os -march=native -mtune=native -ffunction-sections -fdata-sections
- LDFLAGS=-Wl,--gc-sections
- .SUFFIXES: .au
- all: au8b_8kHz au8b_44.1kHz SDL_YUV_visualisation wayland kagome_kagome.au battery_low.au battery_back.au dev_draw
- SDL_YUV_visualisation: SDL_YUV_visualisation.c
- $(CC) $(CFLAGS) SDL_YUV_visualisation.c -o SDL_YUV_visualisation `sdl2-config --cflags --libs`
- xdg-shell-client-protocol.h:
- $(WAYLAND_SCANNER) client-header $(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
- xdg-shell-protocol.c: xdg-shell-client-protocol.h
- $(WAYLAND_SCANNER) private-code $(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
- wayland: wayland.c xdg-shell-protocol.c
- $(CC) $(CFLAGS) -o $@ $< xdg-shell-protocol.c -lwayland-client -lrt $(LDFLAGS)
- strip --strip-all wayland
- dev_draw: dev_draw.c xdg-shell-protocol.c Makefile
- $(CC) $(CFLAGS) -o $@ $< xdg-shell-protocol.c -lwayland-client -lrt $(LDFLAGS)
- .c.au:
- $(CC) $(CFLAGS) -o $* $< -lm
- ./$* > $@
- rm -f $*
- .PHONY: clean
- clean:
- rm SDL_YUV_visualisation wayland dev_draw