-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (20 loc) · 704 Bytes
/
Makefile
File metadata and controls
29 lines (20 loc) · 704 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Make sure that this variable points the compiler/linker to the modified LZFX library
LZFX_FLAGS = -I ../lzfx -L ../lzfx -llzfx
all: bootsec
# assemble payload
payload.bin: payload.asm
nasm -f bin -o $@ $<
# compile compression tool
lzfx-raw: lzfx-raw.c
gcc -o $@ $< $(LZFX_FLAGS)
# compress payload
payload.lzf: payload.bin lzfx-raw
./lzfx-raw $< $@
@echo "Uncompressed size: $$(stat --printf=%s $<) bytes"
@echo "Compressed size: $$(stat --printf=%s $@) bytes"
# assemble boot sector
bootsec: bootsec.asm payload.lzf
nasm -f bin -l bootsec.lst -o $@ $<
# delete output and temporary files
clean:
$(RM) bootsec bootsec.lst payload.bin payload.lzf lzfx-raw