chyyuu / header-gen Goto Github PK
View Code? Open in Web Editor NEWThis project forked from mikewangexe/header-gen
This project forked from mikewangexe/header-gen
dependencies ============ LLVM/Clang 3.3 (built from source) make 3.82 or above (3.81 will definitely not work) python-termcolor (can be find at contrib/termcolor-1.1.0) sqlite3-devel Build howto =========== 1. header-gen requires a modified version based on LLVM/clang 3.3. Please download LLVM/Clang 3.3, apply the patch in patch/clang to Clang source and build the modified compiler suite. 2. Copy the bin/ and lib/ (or lib64/) of the installed LLVM/Clang here. The layout may look like this: header-gen ├── bin ├── clang-plugins ├── contrib ├── DeclComposer.py ├── envsetup.sh ├── lib64 ├── linux ├── Makefile.inc ├── patch ├── README <--- This file --- └── unittests 3. Follow clang-plugins/README to build and install DeclFilter.so. Run unittests ============= 1. Execute: [xx@xx header-gen]$ source envsetup.sh [xx@xx header-gen]$ cd unittests [xx@xx unittests]$ make Note: Please remember to 'source envsetup.sh' this step again once you launch a new bash session! For each *.c in unittests/, the following files will be generated: - *.oo: object built with original headers (i.e. headers in unittests/include) - *.sqlite: database of symbols usages generated by DeclFilter.so - *.d/: directory containing generated headers - *.log/: directory containing random logs from DeclComposer.py - *.o: object built with generated headers (i.e. *.d/) You can test a single source (e.g. basic.c) by: [xx@xx unittests]$ make basic.o 2. Execute: [xx@xx unittests]$ make clean to remote generated files Generate headers for Linux drivers ================================== 1. Change LINUX_DIR to the path of linux source tree on your box, and configure ARCH, BOARD, TOOLCHAIN_PREFIX and PLATFORM_CC_FLAGS according to your needs. 2. In the top directory, execute: [xx@xx header-gen]$ source envsetup.sh Note: Please remember to do this step again once you launch a new bash session! 3. Enter the directory 'linux': [xx@xx header-gen]$ cd linux 4. Copy your driver sources (e.g. virtio): [xx@xx linux]$ cp /path/to/your/drivers/virtio . -r Note: the driver sources should be all placed in a single directory. 5. Append the name of the directory ('virtio' in the above example) to the 'directories' variable at line 9 in Makefile. 6. Try generating headers: [xx@xx linux]$ make virtio.o
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.