summaryrefslogtreecommitdiff
path: root/userland/sh/Makefile
blob: adccfb3a4c87bdf956870d3ad7c6cfb73ed8ff8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
CC="/home/anton/prj/osdev/sysroot/bin/i686-sb-gcc"
CFLAGS = -ggdb -ffreestanding -O0 -Wall -Wextra -pedantic -mgeneral-regs-only -Wimplicit-fallthrough -fsanitize=shift,signed-integer-overflow,bounds
BINS=sh
all: $(BINS)

sh.o: sh.c
	$(CC) $(CFLAGS) -L../libc/ -lc -c sh.c -I../libc/
#	$(CC) $(CFLAGS) ../libc/libc.o ../libc/crt0.o sh.c -I../libc/

clean:
	rm sh sh.o
sh: sh.o
	$(CC) -shared -o sh -ffreestanding -nostdlib $(CFLAGS) sh.o -L../libc/ -lc -lgcc #-L../libc/c.a