build tweaks

This commit is contained in:
Gordon Williams 2022-12-09 10:54:30 +00:00
parent 366ccd969f
commit daeaaa860c
2 changed files with 12 additions and 11 deletions

View File

@ -17,10 +17,12 @@ import pinutils;
info = {
'name' : "Embedded Espruino",
'variables' : 4000, # 0 = resizable variables, rather than fixed
'binary_name' : 'espruino_embedded',
'binary_name' : 'espruino_embedded.c',
'build' : {
'libraries' : [],
'makefile' : []
'makefile' : [
'DEFINES+=-DUSE_CALLFUNCTION_HACK' # for now, just ensure we can be properly multiplatform
]
}
};
chip = {

View File

@ -1,11 +1,10 @@
proj: $(PLATFORM_CONFIG_FILE) $(PROJ_NAME)
$(PROJ_NAME): $(OBJS)
@echo $($(quiet_)link)
@$(call link)
sourcecode: $(SOURCES) $(PLATFORM_CONFIG_FILE)
cat $(SOURCES) > gen/temp.c
gcc $(DEFINES) $(INCLUDE) -E -P gen/temp.c -o gen/temp2.c
cat targets/embed/embed_header.c gen/temp2.c > sourcecode.c
rm gen/temp.c gen/temp2.c
$(PROJ_NAME): $(SOURCES) $(PLATFORM_CONFIG_FILE)
cat $(SOURCES) > $(PROJ_NAME)
gcc $(DEFINES) $(INCLUDE) -E -P $(PROJ_NAME) -o gen/temp.c
cat targets/embed/embed_header.c gen/temp.c > $(PROJ_NAME)
rm gen/temp.c
@echo ========================================
@echo Created $(PROJ_NAME)
@echo Test with "gcc $(PROJ_NAME) -lm"