20 lines
511 B
Python
Executable File
20 lines
511 B
Python
Executable File
#!/usr/bin/python3
|
|
|
|
import sys
|
|
|
|
base=sys.argv[1]
|
|
ubase=base.upper()
|
|
dash=base.replace("_", "-")
|
|
|
|
with open(f"wrap-{dash}.hpp", "w") as f:
|
|
print(f"#ifndef WRAP_{ubase}_HPP", file=f)
|
|
print(f"#define WRAP_{ubase}_HPP", file=f)
|
|
print("", file=f)
|
|
print('#include "eng-malloc.hpp"', file=f)
|
|
print(f"#include <{base}>", file=f)
|
|
print("", file=f)
|
|
print("namespace eng {", file=f)
|
|
print("} // namespace eng", file=f)
|
|
print("", file=f)
|
|
print(f"#endif // WRAP_{ubase}_HPP", file=f)
|