Add acme scripts

This commit is contained in:
John Alanbrook 2022-06-28 23:51:21 +00:00
parent f93b49e0d0
commit a350083bec
5 changed files with 32 additions and 9 deletions

View file

@ -88,6 +88,8 @@ COMPILER_FLAGS = $(includeflag) -I/usr/local/include -g -O0 $(WARNING_FLAGS) -MD
LIBPATH = -L./bin -L/usr/local/lib -L/usr/local/lib/tcc LIBPATH = -L./bin -L/usr/local/lib -L/usr/local/lib/tcc
ALLFILES != find source/ -name '*.[ch]' -type f
ifeq ($(UNAME), Windows_NT) ifeq ($(UNAME), Windows_NT)
LINKER_FLAGS = -static -DSDL_MAIN_HANDLED LINKER_FLAGS = -static -DSDL_MAIN_HANDLED
ELIBS = engine editor mingw32 SDL2main SDL2 m dinput8 dxguid dxerr8 user32 gdi32 winmm imm32 ole32 oleaut32 shell32 version uuid setupapi opengl32 stdc++ winpthread ELIBS = engine editor mingw32 SDL2main SDL2 m dinput8 dxguid dxerr8 user32 gdi32 winmm imm32 ole32 oleaut32 shell32 version uuid setupapi opengl32 stdc++ winpthread
@ -161,6 +163,10 @@ $(objprefix)/%.o:%.c
@echo Making C object $@ @echo Making C object $@
-@$(CC) $(COMPILER_FLAGS) -@$(CC) $(COMPILER_FLAGS)
tags: $(ALLFILES)
@echo Making tags
@ctags -x -R source > tags
clean: clean:
@echo Cleaning project @echo Cleaning project
@find $(BIN) -type f -delete @find $(BIN) -type f -delete

24
acme/cdef Executable file
View file

@ -0,0 +1,24 @@
#!/usr/bin/perl
# Use with tags created with 'ctags -x'; give it a symbol
use strict;
use warnings;
my $pat = $ARGV[0] or die("Need a tag to find");
print "Found for the tag $pat: \n";
sub main
{
my $t = 'tags';
open(FH, $t) or die("File $t not found.");
while (my $line = <FH>) {
if ($line =~ /^$pat/) {
my @l = split(' ', $line);
#print "$l[3]:$l[2] \n";
exec 'echo $l[3]:$l[2] > /dev/null'
}
}
}
main();

View file

@ -1,9 +1,6 @@
#include "sound.h" #include "sound.h"
#include "resources.h" #include "resources.h"
#include <stdlib.h>
ma_engine engine; ma_engine engine;

View file

@ -1,7 +1,7 @@
#ifndef SOUND_H #ifndef SOUND_H
#define SOUND_H #define SOUND_H
#include <miniaudio.h> #include "miniaudio.h"

View file

@ -1,13 +1,9 @@
#include "window.h" #include "window.h"
#include <string.h> #include <string.h>
#include "texture.h" #include "texture.h"
#include "log.h" #include "log.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <vec.h> #include <vec.h>
static struct mSDLWindow *mainwin; static struct mSDLWindow *mainwin;