1.编译分析
goahead\goahead-5.1.1\projects\goahead-linux-default.mk
# goahead-linux-default.mk -- Makefile to build Embedthis GoAhead Community Edition for linux
NAME := goahead
VERSION := 5.1.1
PROFILE ?= default
ARCH ?= $(shell uname -m | sed 's/i.86/x86/;s/x86_64/x64/;s/arm.*/arm/;s/mips.*/mips/')
CC_ARCH ?= $(shell echo $(ARCH) | sed 's/x86/i686/;s/x64/x86_64/')
OS ?= linux
#此处可修改编译器
CC ?= gcc
AR ?= ar
CONFIG ?= $(OS)-$(ARCH)-$(PROFILE)
BUILD ?= build/$(CONFIG)
LBIN ?= $(BUILD)/bin
PATH := $(LBIN):$(PATH)
test编译:
#
# goahead-test
#
DEPS_37 += $(BUILD)/bin/libgo.so
DEPS_37 += $(BUILD)/.install-certs-modified
DEPS_37 += $(BUILD)/obj/test.o
ifeq ($(ME_COM_MBEDTLS),1)
LIBS_37 += -lmbedtls
endif
ifeq ($(ME_COM_MBEDTLS),1)
LIBS_37 += -lgoahead-mbedtls
endif
ifeq ($(ME_COM_MBEDTLS),1)
LIBS_37 += -lmbedtls
endif
LIBS_37 += -lgo
ifeq ($(ME_COM_MBEDTLS),1)
LIBS_37 += -lgoahead-mbedtls
endif
$(BUILD)/bin/goahead-test: $(DEPS_37)
@echo ' [Link] $(BUILD)/bin/goahead-test'
$(CC) -o $(BUILD)/bin/goahead-test $(LDFLAGS) $(LIBPATHS) "$(BUILD)/obj/test.o" $(LIBPATHS_37) $(LIBS_37) $(LIBS_37) $(LIBS) $(LIBS)