lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi.
A little offtopic question but i didn't find this info on the make manual:

I want to create a makefile rule to create my tolua bindings... I just
don't know how to define it.

Example: say all my pkg files X.pkg generate the binding files
Xtolua.cpp and Xtolua.h . How to create out of:

Xtolua.cpp Xtolua.h: X.pkg
  tolua5 -o Xtolua.cpp -H Xtolua.h -n X $<

an implicit rule for all my pkgs? Something like

%tolua.cpp %tolua.h: %.pkg
  tolua5 -o $@1 -H $@2 -n $givemeX $<

Thanks :)

-- Fred