wut/crt/Makefile

25 lines
419 B
Makefile
Raw Normal View History

2015-12-27 03:10:38 +01:00
WUT_ROOT := $(CURDIR)/..
include $(WUT_ROOT)/rules/ppc.mk
CFILES := $(wildcard *.c)
SFILES := $(wildcard *.S)
CRT0 := crt0.o
STUBS := $(SFILES:.S=.o) $(CFILES:.c=.o)
all: $(STUBS) $(CRT0)
clean:
@echo "[RM] $(notdir $(CRT0))"
@rm -f $(STUBS) $(CRT0)
install: all
@mkdir -p $(WUT_ROOT)/lib
@cp -f *.o $(WUT_ROOT)/lib
%.o: %.S
@echo "[CC] $(notdir $<)"
@$(CC) $(CFLAGS) -c $< -o $@
.PHONY: all clean