diff --git a/LICENSE.md b/LICENSE.md
new file mode 100644
index 0000000..524c54d
--- /dev/null
+++ b/LICENSE.md
@@ -0,0 +1,17 @@
+Debug stub for Z80.
+
+Copyright (C) 2022 Empathic Qubit.
+Copyright (C) 2021-2022 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
diff --git a/README.md b/README.md
index 6a5d40e..2923a4c 100644
--- a/README.md
+++ b/README.md
@@ -9,3 +9,12 @@ functions in your program for it to compile:
Other functions will also be needed to do anything useful.
See [The template project for TI 8x calculators](https://github.com/empathicqubit/z88dk-ti8xp-template) for an example implementation.
+
+# License
+
+This project is licensed under GPLv3, in compliance with the original stub code.
+In many cases this means if you distribute a binary file produced by this code,
+you must provide the user the sources of all code which produced that binary file.
+Please see [the license](LICENSE.md), and if you're not sure, don't use it.
+It's quite large and slow, so you probably shouldn't be distributing it anyway,
+only using it for debugging purposes.
\ No newline at end of file
diff --git a/src/gdb.c b/src/gdb.c
index 13f6fdc..1c0b787 100644
--- a/src/gdb.c
+++ b/src/gdb.c
@@ -1,3 +1,23 @@
+/* Debug stub for Z80.
+
+ Copyright (C) 2022 Empathic Qubit.
+ Copyright (C) 2021-2022 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see . */
+
#include "lib.h"
#include "gdb.h"
diff --git a/src/gdb.h b/src/gdb.h
index 521140a..3678e76 100644
--- a/src/gdb.h
+++ b/src/gdb.h
@@ -1,3 +1,23 @@
+/* Debug stub for Z80.
+
+ Copyright (C) 2022 Empathic Qubit.
+ Copyright (C) 2021-2022 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see . */
+
#ifndef __GDB_GDB_H__
#define __GDB_GDB_H__
diff --git a/src/lib.c b/src/lib.c
index 5099101..56cee13 100644
--- a/src/lib.c
+++ b/src/lib.c
@@ -1,7 +1,6 @@
-/* This file contains stuff internal to the library */
-
/* Debug stub for Z80.
+ Copyright (C) 2022 Empathic Qubit.
Copyright (C) 2021-2022 Free Software Foundation, Inc.
This file is part of GDB.
@@ -19,6 +18,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see . */
+/* This file contains stuff internal to the library */
+
#include "debug.h"
#include "lib.h"
#include "gdb.h"
diff --git a/src/lib.h b/src/lib.h
index e76ab2c..d5734b9 100644
--- a/src/lib.h
+++ b/src/lib.h
@@ -1,3 +1,23 @@
+/* Debug stub for Z80.
+
+ Copyright (C) 2022 Empathic Qubit.
+ Copyright (C) 2021-2022 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see . */
+
#ifndef __GDB_LIB_H__
#define __GDB_LIB_H__