old-MTGos-old/user/Makefile
2016-04-26 20:43:12 +02:00

17 lines
373 B
Makefile

include ../kernel.settings
SRCS = $(shell find -name '*.c')
OBJS = $(addsuffix .o,$(basename $(SRCS)))
CC = $(PREFIX)gcc
LD = $(PREFIX)ld
ASFLAGS = -m32
CFLAGS = -m32 -w -g -fno-stack-protector -nostdinc -I include -fpie
LDFLAGS = -melf_i386 -Ttest.ld
test.elf: $(OBJS)
$(LD) $(LDFLAGS) -o $@ $^
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $^
clean:
rm $(OBJS)
.PHONY: clean