Compare commits

...

2 commits

Author SHA1 Message Date
sam
020797b9d8 update gitignore 2024-09-07 17:06:31 +12:00
sam
17abd5e1d2 improve makefile compatibility 2024-09-07 17:05:20 +12:00
2 changed files with 4 additions and 2 deletions

2
.gitignore vendored
View file

@ -5,6 +5,8 @@ include/gear/resources.h
res/res.c
log.txt
*.exe
*.pdb
*.ilk
gear-bin
compile_commands.json
**/*.o

View file

@ -61,8 +61,8 @@ $(RESOURCES_OBJ): $(RESOURCES_C) $(RESOURCE_FILES)
$(RESOURCES_H): $(RESOURCES_OBJ)
@echo "#ifndef __G_RESOURCES_H__" > $@
@echo "#define __G_RESOURCES_H__" >> $@
@nm -g -j $(RESOURCES_OBJ) | \
awk '{ if($$0 ~ /len$$/) { print "extern int " substr($$0, 2) ";" } else { print "extern char " substr($$0, 2) "[];" } }' >> $@
nm -g -j $(RESOURCES_OBJ) | sed "s/^_//" | \
awk '{ if($$0 ~ /len$$/) { print "extern int " $$0 ";" } else { print "extern char " $$0 "[];" } }' >> $@
@echo "#endif" >> $@
@echo "Resources compiled"