2021-11-11 20:12:30 +03:00
|
|
|
EXTENSION?=txt
|
|
|
|
FORMAT?=DEFAULT
|
Review parser Makefile (#2765)
* parser: Fail gracefully if a nonexistent file is passed on the command line
Before, if a nonexistent file was passed to LoadFileText(), it would
return NULL, and the parser would happily dereference it.
* parser: Refactor Makefile and update the path to easings.h (now reasings.h)
Before, the `make all` target would simply segfault, see 0a679d79
Now, if a file in the `make all` target doesn't exist, make will write
an error.
Individual API files can be generated likeso, provided the header file
the target depends on exists:
FORMAT=JSON EXTENSION=json make raygui_api.json
In order for the `make all` target to succeed, raygui.h, physac.h and
rmem.h need to be added to the correct directory.
2022-10-20 18:29:03 +03:00
|
|
|
.PHONY: all parse clean raylib_api
|
2021-11-11 20:12:30 +03:00
|
|
|
|
|
|
|
|
Review parser Makefile (#2765)
* parser: Fail gracefully if a nonexistent file is passed on the command line
Before, if a nonexistent file was passed to LoadFileText(), it would
return NULL, and the parser would happily dereference it.
* parser: Refactor Makefile and update the path to easings.h (now reasings.h)
Before, the `make all` target would simply segfault, see 0a679d79
Now, if a file in the `make all` target doesn't exist, make will write
an error.
Individual API files can be generated likeso, provided the header file
the target depends on exists:
FORMAT=JSON EXTENSION=json make raygui_api.json
In order for the `make all` target to succeed, raygui.h, physac.h and
rmem.h need to be added to the correct directory.
2022-10-20 18:29:03 +03:00
|
|
|
raylib_parser: raylib_parser.c
|
2021-11-11 20:12:30 +03:00
|
|
|
cc raylib_parser.c -o raylib_parser
|
|
|
|
|
Review parser Makefile (#2765)
* parser: Fail gracefully if a nonexistent file is passed on the command line
Before, if a nonexistent file was passed to LoadFileText(), it would
return NULL, and the parser would happily dereference it.
* parser: Refactor Makefile and update the path to easings.h (now reasings.h)
Before, the `make all` target would simply segfault, see 0a679d79
Now, if a file in the `make all` target doesn't exist, make will write
an error.
Individual API files can be generated likeso, provided the header file
the target depends on exists:
FORMAT=JSON EXTENSION=json make raygui_api.json
In order for the `make all` target to succeed, raygui.h, physac.h and
rmem.h need to be added to the correct directory.
2022-10-20 18:29:03 +03:00
|
|
|
raylib_api: ../src/raylib.h raylib_parser
|
|
|
|
FORMAT=DEFAULT EXTENSION=txt $(MAKE) raylib_api.txt
|
|
|
|
FORMAT=JSON EXTENSION=json $(MAKE) raylib_api.json
|
|
|
|
FORMAT=XML EXTENSION=xml $(MAKE) raylib_api.xml
|
|
|
|
FORMAT=LUA EXTENSION=lua $(MAKE) raylib_api.lua
|
|
|
|
|
|
|
|
raylib_api.$(EXTENSION): ../src/raylib.h raylib_parser
|
2021-11-11 20:12:30 +03:00
|
|
|
./raylib_parser -i ../src/raylib.h -o raylib_api.$(EXTENSION) -f $(FORMAT) -d RLAPI
|
Review parser Makefile (#2765)
* parser: Fail gracefully if a nonexistent file is passed on the command line
Before, if a nonexistent file was passed to LoadFileText(), it would
return NULL, and the parser would happily dereference it.
* parser: Refactor Makefile and update the path to easings.h (now reasings.h)
Before, the `make all` target would simply segfault, see 0a679d79
Now, if a file in the `make all` target doesn't exist, make will write
an error.
Individual API files can be generated likeso, provided the header file
the target depends on exists:
FORMAT=JSON EXTENSION=json make raygui_api.json
In order for the `make all` target to succeed, raygui.h, physac.h and
rmem.h need to be added to the correct directory.
2022-10-20 18:29:03 +03:00
|
|
|
|
|
|
|
raymath_api.$(EXTENSION): ../src/raymath.h raylib_parser
|
2021-11-11 20:12:30 +03:00
|
|
|
./raylib_parser -i ../src/raymath.h -o raymath_api.$(EXTENSION) -f $(FORMAT) -d RMAPI
|
Review parser Makefile (#2765)
* parser: Fail gracefully if a nonexistent file is passed on the command line
Before, if a nonexistent file was passed to LoadFileText(), it would
return NULL, and the parser would happily dereference it.
* parser: Refactor Makefile and update the path to easings.h (now reasings.h)
Before, the `make all` target would simply segfault, see 0a679d79
Now, if a file in the `make all` target doesn't exist, make will write
an error.
Individual API files can be generated likeso, provided the header file
the target depends on exists:
FORMAT=JSON EXTENSION=json make raygui_api.json
In order for the `make all` target to succeed, raygui.h, physac.h and
rmem.h need to be added to the correct directory.
2022-10-20 18:29:03 +03:00
|
|
|
|
|
|
|
rlgl_api.$(EXTENSION): ../src/rlgl.h raylib_parser
|
2022-06-06 12:11:39 +03:00
|
|
|
./raylib_parser -i ../src/rlgl.h -o rlgl_api.$(EXTENSION) -f $(FORMAT) -d RLAPI -t "RLGL IMPLEMENTATION"
|
Review parser Makefile (#2765)
* parser: Fail gracefully if a nonexistent file is passed on the command line
Before, if a nonexistent file was passed to LoadFileText(), it would
return NULL, and the parser would happily dereference it.
* parser: Refactor Makefile and update the path to easings.h (now reasings.h)
Before, the `make all` target would simply segfault, see 0a679d79
Now, if a file in the `make all` target doesn't exist, make will write
an error.
Individual API files can be generated likeso, provided the header file
the target depends on exists:
FORMAT=JSON EXTENSION=json make raygui_api.json
In order for the `make all` target to succeed, raygui.h, physac.h and
rmem.h need to be added to the correct directory.
2022-10-20 18:29:03 +03:00
|
|
|
|
|
|
|
reasings_api.$(EXTENSION): ../examples/others/reasings.h raylib_parser
|
|
|
|
./raylib_parser -i ../examples/others/reasings.h -o reasings_api.$(EXTENSION) -f $(FORMAT) -d EASEDEF
|
|
|
|
|
|
|
|
rmem_api.$(EXTENSION): ../rmem.h raylib_parser
|
|
|
|
./raylib_parser -i ../rmem.h -o rmem_api.$(EXTENSION) -f $(FORMAT) -d RMEMAPI -t "RMEM IMPLEMENTATION"
|
|
|
|
|
|
|
|
physac_api.$(EXTENSION): ../physac.h raylib_parser
|
2022-06-06 12:11:39 +03:00
|
|
|
./raylib_parser -i ../physac.h -o physac_api.$(EXTENSION) -f $(FORMAT) -d PHYSACDEF -t "PHYSAC IMPLEMENTATION"
|
Review parser Makefile (#2765)
* parser: Fail gracefully if a nonexistent file is passed on the command line
Before, if a nonexistent file was passed to LoadFileText(), it would
return NULL, and the parser would happily dereference it.
* parser: Refactor Makefile and update the path to easings.h (now reasings.h)
Before, the `make all` target would simply segfault, see 0a679d79
Now, if a file in the `make all` target doesn't exist, make will write
an error.
Individual API files can be generated likeso, provided the header file
the target depends on exists:
FORMAT=JSON EXTENSION=json make raygui_api.json
In order for the `make all` target to succeed, raygui.h, physac.h and
rmem.h need to be added to the correct directory.
2022-10-20 18:29:03 +03:00
|
|
|
|
|
|
|
raygui_api.$(EXTENSION): ../raygui.h raylib_parser
|
2022-06-06 12:11:39 +03:00
|
|
|
./raylib_parser -i ../raygui.h -o raygui_api.$(EXTENSION) -f $(FORMAT) -d RAYGUIAPI -t "RAYGUI IMPLEMENTATION"
|
2021-11-11 20:12:30 +03:00
|
|
|
|
Review parser Makefile (#2765)
* parser: Fail gracefully if a nonexistent file is passed on the command line
Before, if a nonexistent file was passed to LoadFileText(), it would
return NULL, and the parser would happily dereference it.
* parser: Refactor Makefile and update the path to easings.h (now reasings.h)
Before, the `make all` target would simply segfault, see 0a679d79
Now, if a file in the `make all` target doesn't exist, make will write
an error.
Individual API files can be generated likeso, provided the header file
the target depends on exists:
FORMAT=JSON EXTENSION=json make raygui_api.json
In order for the `make all` target to succeed, raygui.h, physac.h and
rmem.h need to be added to the correct directory.
2022-10-20 18:29:03 +03:00
|
|
|
parse: raylib_api.$(EXTENSION) raymath_api.$(EXTENSION) rlgl_api.$(EXTENSION) rmem_api.$(EXTENSION) physac_api.$(EXTENSION) raygui_api.$(EXTENSION)
|
|
|
|
|
|
|
|
|
|
|
|
# `make parse` (and therefore `make all) requires
|
|
|
|
# rmem.h, physac.h and raygui.h to exist in the correct directory
|
|
|
|
# API files for individual headers can be created likeso, provided the relevant header exists:
|
|
|
|
# FORMAT=JSON EXTENSION=json make raygui_api.json
|
|
|
|
all: raylib_parser
|
|
|
|
FORMAT=DEFAULT EXTENSION=txt $(MAKE) parse
|
|
|
|
FORMAT=JSON EXTENSION=json $(MAKE) parse
|
|
|
|
FORMAT=XML EXTENSION=xml $(MAKE) parse
|
|
|
|
FORMAT=LUA EXTENSION=lua $(MAKE) parse
|
|
|
|
|
2021-11-11 20:12:30 +03:00
|
|
|
clean:
|
|
|
|
rm -f raylib_parser *.json *.txt *.xml *.lua
|