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

Diff of /trunk/uar/Makefile

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 25 by rakinar2, Tue Aug 6 13:06:45 2024 UTC revision 57 by rakinar2, Sat Sep 7 15:02:56 2024 UTC
# Line 1  Line 1 
1  CC = gcc  CC = gcc
2  CFLAGS = -std=c99 -g -O2 -I. -Wall -Wextra -Werror -pedantic -DHAVE_CONFIG_H -DNDEBUG  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  all: uar bin-exec
9  uar: uar.o main.o xmalloc.o  
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:  clean:
     rm -f uar *.o  
33        @echo "  RM bin-exec"
34        @echo "  RM uar"
35        @echo "  RM *.o"
36        @$(RM) uar *.o bin-exec *.a

Legend:
Removed from v.25  
changed lines
  Added in v.57

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26