# pcb-rnd hacking - simple core plugins

## Introduction

## Setting up a new core plugin

- 1. make up a name for the plugin. There are a few conventions. This document will refer to the name as plg, always replace it with your chosen name.
- 2. cd src_plugins; svn mkdir plg
- 3. copy all files from the plugin template
- 4. edit Makefile: replace "foobar" to plg
- 5. edit plg.pup; there should be short summary about the purpose of the plugin then "#key: value" pairs for statistics. Please refer to the pup syntax
- 6. edit Plug.tmpasm: replace "foobar" with plg, list all local objects you plan to have
- 7. rename and edit foobar.c: replace "foobar" with plg
- 8. create your C sources and headers in src_plugins/plg/
- 9. run "make map_plugins" in src/ to get your new plugin on the plugin list
- 10. run ./configure --buildin-plg
- 11. run make to see if it compiles and test
- (12. while developing, you can run make from src_plugins/plg - if your plugin is a builtin, it will recompile pcb-rnd. For some of us it's convenient to run make in the same directory where all the source files are.)

Congratulations, you now have a compilable core plugin that does not do anything yet, with the basic API skeleton in place.