forked from fengyoulin/ef
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.i386
32 lines (20 loc) · 1.4 KB
/
Makefile.i386
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
all: prog_i386_poll clean_tmp
linux: prog_i386_poll prog_i386_epoll prog_i386_epollet clean_tmp
macos: prog_i386_poll prog_i386_kqueue clean_tmp
solaris: prog_i386_poll prog_i386_port clean_tmp
prog_i386_poll: main.c poll.c framework.c coroutine.c fiber.c /tmp/fiber.s
gcc -g -m32 -std=gnu99 -o prog_i386_poll main.c poll.c framework.c coroutine.c fiber.c /tmp/fiber.s
prog_i386_kqueue: main.c kqueue.c framework.c coroutine.c fiber.c /tmp/fiber.s
gcc -g -m32 -std=gnu99 -o prog_i386_kqueue main.c kqueue.c framework.c coroutine.c fiber.c /tmp/fiber.s
prog_i386_epoll: main.c epoll.c framework.c coroutine.c fiber.c /tmp/fiber.s
gcc -g -m32 -std=gnu99 -o prog_i386_epoll main.c epoll.c framework.c coroutine.c fiber.c /tmp/fiber.s
prog_i386_epollet: main.c epollet.c framework.c coroutine.c fiber.c /tmp/fiber.s
gcc -g -m32 -std=gnu99 -o prog_i386_epollet main.c epollet.c framework.c coroutine.c fiber.c /tmp/fiber.s
prog_i386_port: main.c port.c framework.c coroutine.c fiber.c /tmp/fiber.s
gcc -g -m32 -std=gnu99 -o prog_i386_port main.c port.c framework.c coroutine.c fiber.c /tmp/fiber.s
/tmp/fiber.s: i386/fiber.s
if [[ "$$(uname -a)" =~ "Darwin" ]]; then cat i386/fiber.s | sed 's/ef_fiber_internal_swap/_ef_fiber_internal_swap/g' | sed 's/ef_fiber_internal_init/_ef_fiber_internal_init/g' > /tmp/fiber.s; else cp i386/fiber.s /tmp/fiber.s; fi
clean_tmp:
rm /tmp/fiber.s
clean:
rm -rf prog_i386_* /tmp/fiber.s