/[osn-commons]/trunk/uar/Makefile
ViewVC logotype

Contents of /trunk/uar/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 57 - (show annotations)
Sat Sep 7 15:02:56 2024 UTC (6 months, 3 weeks ago) by rakinar2
File size: 846 byte(s)
chore: update files

1 CC = gcc
2 CFLAGS = -std=c99 -g -O2 -I. -I../include -Wall -Wextra -Werror -pedantic -DHAVE_CONFIG_H -DNDEBUG -DHAVE_PLIBC
3 LDLIBS = -lm
4 RM = rm -f
5 AS = as
6 ASFLAGS = -g
7
8 all: uar bin-exec
9
10 uar: libuar.a main.o
11 @echo " CCLD $@"
12 @$(CC) $(CFLAGS) -o $@ main.o -L. -luar $(LDLIBS)
13
14 bin-exec: selfext.o selfext_entry.o
15 @echo " CCLD $@"
16 @$(CC) $(CFLAGS) -ffreestanding -nostdlib -e _start -o $@ selfext.o selfext_entry.o ../plibc/lib/libc.a ../plibc/x86_64/libx86_64.a -L. $(LDLIBS)
17
18 libuar.a selfext.o selfext_entry.o: CFLAGS += -ffreestanding -nostdlib -I../plibc/lib
19
20 %.o: %.s
21 @echo " AS $@"
22 @$(AS) $(ASFLAGS) -c -o $@ $<
23
24 %.o: %.c
25 @echo " CC $@"
26 $(CC) $(CFLAGS) -c -o $@ $<
27
28 libuar.a: uar.o xmalloc.o
29 @echo " AR $@"
30 @ar rcs $@ $^
31
32 clean:
33 @echo " RM bin-exec"
34 @echo " RM uar"
35 @echo " RM *.o"
36 @$(RM) uar *.o bin-exec *.a

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26