os/prog/Makefile

15 lines
240 B
Makefile
Raw Normal View History

2019-03-17 18:04:50 -05:00
C_SOURCES = $(wildcard *.c)
2019-04-26 09:20:07 -05:00
OBJ = $(C_SOURCES:.c=.o ../libc/libc.a)
2019-03-17 18:04:50 -05:00
CFLAGS = -Wall -g -ffreestanding
CC = i386-elf-gcc
prog.elf: $(OBJ)
i386-elf-ld -o $@ $^
2019-04-22 13:18:27 -05:00
rm -rf *.o
2019-03-17 18:04:50 -05:00
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -rf *.o prog.elf