32 lines
626 B
Makefile
32 lines
626 B
Makefile
# Makefile for the nibbles lab.
|
|
# ---> Compile with gamke on BSD systems! <---
|
|
|
|
all: nibbles_asm nibbles_asm_start
|
|
|
|
# Rule for compiling C source
|
|
.c.o:
|
|
gcc -Os -std=c11 -m32 -march=i686 -Wall -g -c $<
|
|
|
|
# Rule for compiling assembly source
|
|
.S.o:
|
|
#as --32 -gstabs $^ -o $@
|
|
gcc -m32 -march=i686 -c $<
|
|
|
|
|
|
# C game
|
|
nibbles_c: main.o cnibbles.o
|
|
gcc -m32 -lcurses $^ -o $@
|
|
|
|
# ASM game
|
|
nibbles_asm: main.o nibbles.o helpers.o
|
|
gcc -m32 -lcurses $^ -o $@
|
|
|
|
# ASM game
|
|
nibbles_asm_start: start.o nibbles.o helpers.o
|
|
gcc -m32 -lcurses -lc -nostdlib $^ -o $@
|
|
|
|
clean:
|
|
rm -f *~
|
|
rm -f *.o
|
|
rm -f nibbles_c nibbles_asm nibbles_asm_start
|