#EXTRAFLAGS:=-ggdb -m32
EXTRAFLAGS:= -Wall -Werror -pedantic --std=c99 -ggdb $(EXTRAFLAGS)
NASMEXTRAFLAGS:=-g -f elf32 -F dwarf
OBJS=bintree.o
SRC=bintree.asm
EXE=tpcopado
INCLUDE=-include /usr/include/errno.h
.PHONY: all clean
$(EXE): $(EXE).c $(OBJS) $(SRC)
gcc $(INCLUDE) -o $@ $(EXTRAFLAGS) $< $(OBJS)
%.o: %.asm
nasm $(NASMEXTRAFLAGS) -o $@ $<
%.o: %.c
gcc -c $(EXTRAFLAGS) -o $@ $<
test: test.o $(OBJS)
$(CC) -o $@ $^
all: $(EXE)
clean:
rm -f $(OBJS)
rm -f $(EXE)