1 config_opt
= $(shell if
[ -e config.h
-a
-n
"`egrep '^\#define[[:space:]]+$(1)([[:space:]]+|$$)' config.h 2>/dev/null`" ]; then echo true
; fi
)
3 .PHONY
: clean install x86emu lrmi
7 ifeq ($(call config_opt
,CONFIG_KLIBC
),true
)
11 CFLAGS
+= -I
/lib
/modules
/$(shell uname
-r
)/source
/include
13 ifeq ($(call config_opt
,CONFIG_X86EMU
),true
)
14 CFLAGS
+= -Ilibs
/x86emu
15 LDFLAGS
+= -Llibs
/x86emu
17 V86OBJS
= v86_x86emu.o
20 CFLAGS
+= -Ilibs
/lrmi-0.10
21 LDFLAGS
+= -Llibs
/lrmi-0.10
-static
30 $(CC
) $(CFLAGS
) -c
-o
$@
$<
32 v86d
: v86.o v86_mem.o
$(V86OBJS
)
33 $(CC
) $(LDFLAGS
) $+ $(LDLIBS
) -o
$@
35 testvbe
: testvbe.o v86_mem.o
$(V86OBJS
)
36 $(CC
) $(LDFLAGS
) $+ $(LDLIBS
) -o
$@
39 make
-w
-C libs
/x86emu
42 make
-e
-w
-C libs
/lrmi-0.10 liblrmi.a
45 rm -rf
*.o v86d testvbe
46 $(MAKE
) -w
-C libs
/lrmi-0.10
clean
47 $(MAKE
) -w
-C libs
/x86emu
clean
53 $(INSTALL
) -D v86d
$(DESTDIR
)/sbin
/v86d