The programming on Contiki is done using the Cooja network simulator, in which the base libraries of RFID chips and sensors are available in C. To program, control and monitor the remote IoT devices, the back-end C programs and related header files can be customized and recompiled to get the desired results.To know about how to integrate the .c file in contiki source Makefile using cooja simulator.
Step 1: Open at location: home/user/contiki/examples/er-rest-examples
Here the coap examples are available in contiki and locate Makefile open it.
For example .c file integrate into source file.
PROJECT_SOURCEFILES += filename.c // add here .c file
Step 2: Open cooja simulator
cd contiki/tools/cooja >> ant run
Create new simulation(ctrl+n).