os/prog/Makefile

14 lines
213 B
Makefile
Raw Normal View History

2019-03-17 18:04:50 -05:00
C_SOURCES = $(wildcard *.c)
OBJ = $(C_SOURCES:.c=.o)
CFLAGS = -Wall -g -ffreestanding
CC = i386-elf-gcc
prog.elf: $(OBJ)
i386-elf-ld -o $@ $^
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -rf *.o prog.elf