mirror of
https://gitlab.freedesktop.org/xorg/lib/libxcb-errors.git
synced 2025-12-26 12:20:08 +01:00
With this change, the output of the code generator actually compiles and can be linked into a library. This also changes the API between the generated code and the library code. Hopefully, this API is nicer. The code generator generates a function register_extensions() that looks up all extensions and calls register_extension() for each one. Also, a global variable xproto_info is exported which contains the information for all core requests and also provides fallback names for unknown major codes / event codes / error codes. Signed-off-by: Uli Schlachter <psychon@znc.in>
17 lines
688 B
Makefile
17 lines
688 B
Makefile
FLAGS=-std=gnu89 -Wall -Wextra -lxcb -fpic -shared -Wl,-no-undefined # -Wl,-export-symbols-regex,'^xcb_errors_'
|
|
|
|
all: src/libxcb_errors.so
|
|
|
|
src/libxcb_errors.so: $(wildcard src/*.c) $(wildcard *.h) src/extensions.c Makefile syms
|
|
gcc $(FLAGS) -Wl,--retain-symbols-file=syms -o $@ $(wildcard src/*.c)
|
|
|
|
src/extensions.c: src/extensions.py
|
|
PYTHONPATH=/home/psychon/projects/proto/ src/extensions.py $@ /home/psychon/projects/proto/src/*xml
|
|
|
|
syms:
|
|
echo xcb_errors_context_new > $@
|
|
echo xcb_errors_context_free > $@
|
|
echo xcb_errors_get_name_for_major_code > $@
|
|
echo xcb_errors_get_name_for_minor_code > $@
|
|
echo xcb_errors_get_name_for_event > $@
|
|
echo xcb_errors_get_name_for_error > $@
|