-
Notifications
You must be signed in to change notification settings - Fork 1
out Makefile of Hello Nore (bare)
南山竹 edited this page Sep 5, 2017
·
1 revision
# out/Makefile (clang 8.1.0 (clang-802.0.42), Darwin:16.7.0:x86_64)
CC = cc
CPP = $(CC)
CAS = $(CC)
AS = $(CC)
AR = ar
LINK = $(CC)
CPPFLAGS =
CFLAGS += -std=c99 -g -Wall -Wextra -Wpointer-arith -Wconditional-uninitialized -Wunused-variable -Wunused-parameter -Wno-error=unused-command-line-argument -Werror
ASFLAGS =
LDFLAGS += -Lout/lib
LDLIBS =
ARFLAGS =
LFLAGS =
YFLAGS =
INC += -Iout -Iout/inc
nm_symbol_opt = -g
nm_optimize_opt = -O2
nm_warn_opt = -Wall -Wextra -Wpointer-arith -Wconditional-uninitialized -Wunused-variable -Wunused-parameter -Wno-error=unused-command-line-argument
nm_error_opt = -Werror
nm_debug_opt =
nm_std_opt = -std=c99
nm_cpu_opt =
nm_verbose_opt = -v
nm_pic_opt =
nm_shared_opt = -dynamiclib
nm_stage_pre = -E
nm_stage_chk = -fsyntax-only
nm_stage_asm = -S
nm_stage_c = -c
# macro define
nm_def_opt = -D
nm_undef_opt = -U
# path separator
nm_p = :
src_root = ./
# nore options
NM_SYMBOL = YES
NM_OPTIMIZE = NO
NM_WARN = YES
NM_ERROR = YES
NM_DEBUG = YES
NM_VERBOSE = NO
NM_STD = YES
NM_CPU = NO
# platform
NM_SYSTEM = Darwin
NM_RELEASE = 16.7.0
NM_MACHINE = x86_64
CC_NAME = clang
CC_VER = 810
# output option
cpp_out = -o
asm_out = -o
obj_out = -o
lib_out = -o
ar_out = rcs
bin_out = -o
# output extension
cpp_ext = .i
asm_ext = .s
obj_ext = .o
lib_ext = .dylib
ar_ext = .a
bin_ext =
default: build
clean:
$(RM) -r out/bin/*
$(RM) -r out/lib/*
$(RM) -r out/inc/*
$(RM) -r out/log/*
$(RM) -r out/pid/*
$(RM) -r out/tmp/*
$(RM) -r out/conf/*
.PHONY: hi hi_test
build: hi
test: hi_test
inc_path=out/inc/
tmp_path=out/tmp/
lib_path=out/lib/
bin_path=out/bin/
#---------------------------------------
hi_root := ./hi/
include ./hi/Makefile
#---------------------------------------
install: build /opt/run/bin /opt/run/lib /opt/run/conf /opt/run/inc
$(call cp-if, out/bin, /opt/run/bin/)
$(call cp-if, out/lib, /opt/run/lib/)
$(call cp-if, out/conf, /opt/run/conf/)
$(call cp-if, out/inc, /opt/run/inc/)
/opt/run/bin /opt/run/lib /opt/run/conf /opt/run/inc:
$(call mkdir-if, /opt/run/bin)
$(call mkdir-if, /opt/run/lib)
$(call mkdir-if, /opt/run/conf)
$(call mkdir-if, /opt/run/inc)
$(call mkdir-if, /opt/run/log)
mkdir-if = $(if $(wildcard $1),,mkdir -p $1)
cp-if = $(foreach f,$(wildcard $1/*),$(shell cp -r $(f) $2))