Skip to content

Instantly share code, notes, and snippets.

@bert
Last active January 18, 2019 20:02
Show Gist options
  • Select an option

  • Save bert/7a8034ff42643a27f2b7c1dd8ca6d518 to your computer and use it in GitHub Desktop.

Select an option

Save bert/7a8034ff42643a27f2b7c1dd8ca6d518 to your computer and use it in GitHub Desktop.
805x_Multiple_source_files_example
*~
*.bak
*.asm
*.ihx
*.lnk
*.lst
*.map
*.mem
*.rel
*.rst
*.sym

805x Multiple source files example

#include <8052.h>
#include "other.h"
void
main (void)
{
function ();
while (1);
}
CC = sdcc
CFLAGS = -mmcs51 --verbose --Werror --fverbose-asm
all:
${CC} ${CFLAGS} -c other.c
${CC} ${CFLAGS} main.c other.rel
clean:
rm -f *~
rm -f *.asm
rm -f *.ihx
rm -f *.lnk
rm -f *.lst
rm -f *.map
rm -f *.mem
rm -f *.rel
rm -f *.rst
rm -f *.sym
#include <8052.h>
#include "other.h"
void
function (void)
{
unsigned int a;
for (a = 0; a < 10000; a++);
}
extern void function (void);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment