deltabeard / Peanut-GB

A Game Boy (DMG) emulator single header library written in C99. Performance is prioritised over accuracy.
https://projects.deltabeard.com/peanutgb/
295 stars 40 forks source link

gb: Allow compiling peanut_gb.h as a separate object file #77

Closed deltabeard closed 1 year ago

deltabeard commented 1 year ago

Profilers seem to only show information for each object file. Being able to compiler peanut_gb.h as a separate object will make it easier to manually profile the code. This can be done by using ifdefs of PEANUT_GB_HEADER and PEANUT_GB_IMPLEMENTATION for including the file as a header or compiling it as a separate object file.