Use Linux's network headers in glibc (XCC)
[akaros.git] / tools / syscall_server / Makefile
1 CFLAGS += -I.
2 V = @
3
4 SYSCALL_SERVER_OBJS = newlib_trans.o syscall_server.o
5 SYSCALL_SERVER_HEADS = syscall_server.h newlib_trans.h
6
7 all: syscall_server_udp syscall_server_pty syscall_server_pipe
8         $(V)rm -rf *.o
9
10 .syscall_server_pipe.in: 
11         $(V)mkfifo $@
12         $(V)chmod ug+rw $@
13
14 .syscall_server_pipe.out: 
15         $(V)mkfifo $@
16         $(V)chmod ug+rw $@
17
18 syscall_server_pipes: .syscall_server_pipe.in .syscall_server_pipe.out 
19
20 %.o: %.c $(SYSCALL_SERVER_HEADS)
21         @echo + cc [SYSCALL_SERVER] $<
22         $(V)$(CC) -c $(CFLAGS) -o $@ $<
23
24 SYSCALL_SERVER_PTY_OBJS = $(SYSCALL_SERVER_OBJS) pty.o
25 syscall_server_pty: $(SYSCALL_SERVER_PTY_OBJS)
26         @echo + cc [SYSCALL_SERVER] $@
27         $(V)$(CC) $(CFLAGS) -o $@ $(SYSCALL_SERVER_PTY_OBJS)
28         
29 SYSCALL_SERVER_PIPE_OBJS = $(SYSCALL_SERVER_OBJS) pipe.o
30 syscall_server_pipe: $(SYSCALL_SERVER_PIPE_OBJS) syscall_server_pipes
31         @echo + cc [SYSCALL_SERVER] $@
32         $(V)$(CC) $(CFLAGS) -o $@ $(SYSCALL_SERVER_PIPE_OBJS)
33
34 SYSCALL_SERVER_UDP_OBJS = $(SYSCALL_SERVER_OBJS) udp.o
35 syscall_server_udp: $(SYSCALL_SERVER_UDP_OBJS)
36         @echo + cc [SYSCALL_SERVER] $@
37         $(V)$(CC) $(CFLAGS) -o $@ $(SYSCALL_SERVER_UDP_OBJS)
38
39 clean:
40         rm -rf *.o
41         rm -rf syscall_server_*
42         rm -rf .syscall_server_*
43