Files
RockOS/rocklibc/makefile

20 lines
311 B
Makefile
Raw Normal View History

CC = i686-elf-gcc
AR = i686-elf-ar
CFLAGS = -ffreestanding -O2 -Wall -Wextra -Iinclude
TARGET = rlibc.a
SRCS = $(shell find src -name "*.c")
OBJS = $(SRCS:.c=.o)
all: $(TARGET)
$(TARGET): $(OBJS)
$(AR) rcs $@ $(OBJS)
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f $(OBJS) $(TARGET)
.PHONY: all clean