|
Revision 266, 0.6 KB
(checked in by mwhitworth, 4 years ago)
|
|
Add -m32 for 64-bit hosts.
|
| Line | |
|---|
| 1 | #Define DEPTH before including this file |
|---|
| 2 | |
|---|
| 3 | .PHONY: clean |
|---|
| 4 | .IGNORE: clean |
|---|
| 5 | |
|---|
| 6 | GCC = gcc |
|---|
| 7 | CPP = gpp |
|---|
| 8 | ASM = nasm |
|---|
| 9 | CFLAGS = -fomit-frame-pointer -ffreestanding -fno-stack-protector -fleading-underscore -fno-builtin -nostdlib -m32 -Wall -Wextra -O2 -I$(DEPTH)include |
|---|
| 10 | BE_VERBOSE=0 |
|---|
| 11 | |
|---|
| 12 | .c.o: |
|---|
| 13 | @$(GCC) $(CFLAGS) -c $*.c -o $*.o |
|---|
| 14 | @echo "Compiling $*.c" |
|---|
| 15 | |
|---|
| 16 | #nasm assembly files |
|---|
| 17 | |
|---|
| 18 | .asm: |
|---|
| 19 | $(ASM) -f bin $*.asm -o |
|---|
| 20 | @echo "Compiling $*.asm" |
|---|
| 21 | |
|---|
| 22 | .s.o: |
|---|
| 23 | $(ASM) -f elf $*.s -o $*.o |
|---|
| 24 | @echo "Compiling $*.s" |
|---|
| 25 | |
|---|
| 26 | #gas assembly files |
|---|
| 27 | .S.o: |
|---|
| 28 | $(GCC) -ffreestanding -fleading-underscore -fno-builtin -m32 -c $*.S -o $*.o |
|---|
| 29 | @echo "Compiling $*.S" |
|---|