os/prog/Makefile
2019-04-26 09:20:07 -05:00

15 lines
240 B
Makefile

C_SOURCES = $(wildcard *.c)
OBJ = $(C_SOURCES:.c=.o ../libc/libc.a)
CFLAGS = -Wall -g -ffreestanding
CC = i386-elf-gcc
prog.elf: $(OBJ)
i386-elf-ld -o $@ $^
rm -rf *.o
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -rf *.o prog.elf