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

Contents of /trunk/uar/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 49 - (show annotations)
Fri Aug 16 18:32:50 2024 UTC (7 months, 2 weeks ago) by rakinar2
File size: 790 byte(s)
feat(uar): add self-extraction tools (incomplete)

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: libuar.a selfext.o selfext_entry.o
15 @echo " CCLD $@"
16 @$(CC) $(CFLAGS) -I../plibc/lib -ffreestanding -nostdlib -e _start -o $@ selfext.o selfext_entry.o ../plibc/lib/libc.a ../plibc/x86_64/libx86_64.a -L. -luar $(LDLIBS)
17
18 %.o: %.s
19 @echo " AS $@"
20 @$(AS) $(ASFLAGS) -c -o $@ $<
21
22 %.o: %.c
23 @echo " CC $@"
24 @$(CC) $(CFLAGS) -c -o $@ $<
25
26 libuar.a: uar.o xmalloc.o
27 @echo " AR $@"
28 @ar rcs $@ $^
29
30 clean:
31 @echo " RM bin-exec"
32 @echo " RM uar"
33 @echo " RM *.o"
34 @$(RM) uar *.o bin-exec *.a

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26