Skip to content

Commit

Permalink
Remove linedebug and symbols by default
Browse files Browse the repository at this point in the history
To reduce generated code size for release.
Add a DEBUG=1 var option to turn back on
  • Loading branch information
neildavis committed Nov 14, 2024
1 parent 3a2cf60 commit 33eec32
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,32 @@
# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

# Ganeral flags
DEBUG := 0

# Tools
TOOLS_DIR := ./tools
VASM_DIR := $(TOOLS_DIR)/vasm
VLINK_DIR := $(TOOLS_DIR)/vlink

# The assembler
ASM := $(VASM_DIR)/vasmm68k_mot
ASM_ARGS := -quiet -m68000 -Fhunk -linedebug -I./include
ASM_ARGS := -quiet -m68000 -Fhunk -I./include

ifeq ($(DEBUG),1)
# Debug vasm args..
ASM_ARGS += -linedebug
endif

# The linker
LD := $(VLINK_DIR)/vlink
LINK_ARGS := -mrel -bamigahunk -Bstatic

ifneq ($(DEBUG),1)
# Release vlink args..
LINK_ARGS += -s
endif

# Source files
SRC_DIR := ./src
MAIN_SRC := $(SRC_DIR)/main.s
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ for CI/CD automated building in the the cloud.
* Only RAW files with 'interleaved' bitplanes data are generated (no 'back-to-back' support)
* Only images for low resolution (non-EHB) mode apps are supported.
* No compression/packing support.
* No support for attached sprites palette generation
* No special treatment for AGA
* Bare bones 'no frills' bootable AmigaDOS ADFs. i.e. no loading messages etc.

Expand Down Expand Up @@ -186,6 +187,12 @@ The various useful targets are described in the table below
| `assets` | Only converts image assets (and generates palette include files) |
| `tools` | Only builds the tools (`vasm` & `vlink`) |

By default the target will not include `linedebug` data and will be stripped of symbols. To preserver these pass `DEBUG=1`:

```sh
make <TARGET> DEBUG=1
```

The Makefile also supports a set of 'clean-up' targets to remove files:

| Target | Description |
Expand Down

0 comments on commit 33eec32

Please sign in to comment.