# Makefile example
#
# Author: CI0118 Lenguajes ensambladores
# Date: 2023/Nov/10
#
# Run "make dev=ASM" to use assembly routines in code
#
# Run "make" to use C++ code
#

CC = gcc
CPP = g++
NASM = nasm
CPPFLAGS = -g -D$(dev)
DEPS = BinNode.o BinTree.o BinTreeS.o BinTtest.o


all: bintree.out

%.o: %.asm
	$(NASM) -g -f elf64 $<

%.o: %.s
	$(CC) -c -g $<

bintree.out: $(DEPS)
	$(CPP) -g -o $@ $(DEPS)

clean:
	rm -f *.o *.out

