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

Annotation of /trunk/uar/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


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