31 lines
640 B
Makefile
31 lines
640 B
Makefile
#### Start of system configuration section. ####
|
|
|
|
srcdir = @srcdir@
|
|
VPATH = @srcdir@
|
|
|
|
CC = @CC@
|
|
|
|
#### End system configuration section ####
|
|
|
|
# Some examples
|
|
|
|
.PHONY: all
|
|
|
|
all: lib libr dev helloworld
|
|
|
|
# normal library
|
|
lib: libinit.o simplelib.c
|
|
$(CC) -nostdlib -O3 -fomit-frame-pointer -fbaserel $^ -o $@
|
|
|
|
# multibase library
|
|
libr: libinitr.o simplelib.c
|
|
$(CC) -nostdlib -O3 -fomit-frame-pointer -resident $^ -o $@
|
|
|
|
# device
|
|
dev: devinit.o simpledev.c
|
|
$(CC) -nostdlib -O3 -fomit-frame-pointer -fbaserel $^ -o $@
|
|
|
|
# helloworld
|
|
helloworld: nbcrt0.o helloworld.c libstubs.a
|
|
$(CC) -nostdlib -O3 -fomit-frame-pointer -s -fbaserel $^ -o $@
|