Added translation layer for all things that might be different between newlib and...
[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_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_init.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_init.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 clean:
35         rm -rf *.o
36         rm -rf syscall_server_*
37         rm -rf .syscall_server_*
38