6 .PHONY
: arch_clean
clean
8 #make sure env CFLAGS variable is not used
11 libgcc
:= $(shell $(CC
) --print-libgcc-file-name
)
13 #include architecure specific make rules
14 include config-
$(ARCH
).mak
17 # Usage: OP_CFLAGS+=$(call cc-option, -falign-functions=0, -malign-functions=0)
19 cc-option
= $(shell if
$(CC
) $(1) -S
-o
/dev
/null
-xc
/dev
/null \
20 > /dev
/null
2>&1; then echo
"$(1)"; else echo
"$(2)"; fi
;)
23 CFLAGS
+= $(autodepend-flags
) -g
-fomit-frame-pointer
-Wall
24 CFLAGS
+= $(call cc-option
, -fno-stack-protector
, "")
25 CFLAGS
+= $(call cc-option
, -fno-stack-protector-all
, "")
26 CFLAGS
+= -I ..
/libkvm
28 LDFLAGS
+= $(CFLAGS
) -L ..
/libkvm
30 CXXFLAGS
= $(autodepend-flags
)
32 autodepend-flags
= -MMD
-MF
$(dir $*).
$(notdir $*).d
34 kvmctl
: LDFLAGS
+= -pthread
-lrt
36 kvmctl
: $(kvmctl_objs
)
37 $(CC
) $(LDFLAGS
) $^
-o
$@
40 $(CC
) $(CFLAGS
) -c
-nostdlib
-o
$@
$^
45 $(RM
) kvmctl
*.o
*.a .
*.d