- Install Android Studio
- https://developer.android.com/studio/
- TODO: describe how to install NDK packages.
- TODO: describe how to check that NDK 21 is installed.
- Get SDL sources SDL2-2.0.12.tar.gz and extract to a location of your choice
cd /tmp
#!/bin/sh | |
# Installation for using GMail as your preferred application | |
# This is for handling mime type: x-scheme-handler/mailto | |
# | |
# Place this script in your $PATH, and mark as executable | |
# | |
# Install the .desktop file: | |
# cp gmail-mailto.desktop ~/.local/share/applications/ | |
# |
/* This software is public domain. No copyright is claimed. | |
* Jon Mayo April 2011 | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
/* Load an .ini format file | |
* filename - path to a file | |
* report - callback can return non-zero to stop, the callback error code is |
# small and low-configuration project Makefile (GNU make required) | |
# Nov 10 2023 - Jon | |
# usage: | |
# 1. place this in the directory of a small C/C++ project. | |
# 2. modify type= configuration option to select executable or library modes. | |
# 3. all c/c++ and assembler sources will be linked into a single | |
# executable or library. | |
# 4. adjust configuration options for desired compiler and linker flags. | |
# examples of typical usage: | |
# make clean |
Program = _ (DeclareVar | Function { printf("good\n"); } | |
| . { printf("bad\n"); exit(1); } | |
)* | |
| !. { printf("done\n"); exit(0); } | |
DeclareVar = type VarInit ( "," _ VarInit )* ";" _ | |
VarInit = identifier ( "=" _ Expression )? | |
Function = t:type i:identifier "(" _ Parameters? ")" _ Compound { | |
printf("Function:\n"); | |
value_print(t); |
cd /tmp
/* showif.c : PUBLIC DOMAIN - Jon Mayo - August 22, 2006 | |
* - You may remove any comments you wish, modify this code any way you wish, | |
* and distribute any way you wish.*/ | |
/* finds all network interfaces and shows a little information about them. | |
* some operating systems list interfaces multiple times because of different | |
* flags, modes, etc. if you want to use this code you should be aware that | |
* duplicate interfaces is a possibility */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> |
#include <stdio.h> | |
#include <string.h> | |
void | |
process(const char *input) | |
{ | |
const char delim[] = { 0x0b, 0x1c, 0x0d, 0 }; | |
int count = 0; | |
while (input[0] != '\0') { |
# Add this snippet to your .bashrc instead of your normal prompt (PS1) setting. | |
# Customize the line below further with your favorite smilies | |
# 😎 🙂 😊 😢 🙁 🙃 | |
PS1='$(test $? -eq 0 && echo "\[\033[0;32m\]😎" || echo "\[\033[0;1;31m\]😢")\[\033[0m\] \W\$ ' | |
# Set window title | |
case "$TERM" in | |
xterm*) | |
# see also man xterm(1) - "Window and Icon Titles" |
all :: | |
clean :: ; $(RM) $(TARGETS) $(foreach t,$(TARGETS),$(OBJS_$t)) | |
.PHONY : all clean | |
## Configuration | |
CFLAGS = -Wall -W -O2 -g | |
# a really aggressive strip-all for ARM | |
STRIP = strip -s -w -R .comment\* -R .note\* -R .gnu.hash -R .ARM.exidx -R .ARM.attributes | |
## Rules | |
%.o : %.c | |
$(COMPILE.c) $(if $(PKGS),$(shell pkg-config --cflags $(PKGS))) $(OUTPUT_OPTION) $< |