1 include ..
/..
/..
/support
/include.mk
3 CFLAGS
+= -I
$(ERL_C_INCLUDE_DIR
) -I..
/..
/..
/support
-I.
5 POSIX_DRV_SO
= ..
/priv
/posix_drv.so
7 SHLIB_OBJS
= posix_drv.o my-posix.o erl_driver_tk.o
11 $(POSIX_DRV_SO
): $(SHLIB_OBJS
)
13 # Symlink is only to help when using "jerl" script.
14 -ln
-s
$(POSIX_DRV_SO
) ..
/ebin
16 posix_drv.o
: posix_drv.c
17 $(CC
) $(CFLAGS
) -o
$@
-c
-fpic
$(ERL_INCLUDE
) $<
19 my-posix.o
: my-posix.c
20 $(CC
) $(CFLAGS
) -o
$@
-c
-fpic
$(ERL_INCLUDE
) $<
22 erl_driver_tk.o
: erl_driver_tk.c
23 $(CC
) $(CFLAGS
) -o
$@
-c
-fpic
$(ERL_INCLUDE
) $<
26 -rm $(POSIX_DRV_SO
) ..
/ebin
/*.so
28 .INTERMEDIATE
: $(SHLIB_OBJS
)