use meson build

This commit is contained in:
Rongsong Shen 2025-12-05 18:17:04 +08:00
parent 5036d77f04
commit 7912242231
4 changed files with 0 additions and 110 deletions

View file

@ -1,15 +0,0 @@
TOP = $(shell pwd)/../..
include $(TOP)/config/Make.config
DIRS = providers scaler
all: $(addsuffix .all,$(DIRS))
clean: $(addsuffix .clean, $(DIRS))
%.all: %
make -C $< all
%.clean: %
make -C $< clean

View file

@ -1,15 +0,0 @@
TOP = $(shell pwd)/../../../
include $(TOP)/config/Make.config
DIRS = baidu
all: $(addsuffix .all,$(DIRS))
clean: $(addsuffix .clean, $(DIRS))
%.all: %
make -C $< all
%.clean: %
make -C $< clean

View file

@ -1,15 +0,0 @@
TOP = $(shell pwd)/../../../..
include $(TOP)/config/Make.config
GO_SRC = main.go
# Target
TARGET = BccTool
all: $(TARGET)
$(TARGET):
cd src/bcctool; ${GO} build -o ../../bin/$(TARGET) $(GO_SRC)
clean:
rm -f bin/$(TARGET)

View file

@ -1,65 +0,0 @@
TOP=$(shell pwd)/../../..
include $(TOP)/config/Make.config
UNITY_CFLAGS = -DUNITY_OUTPUT_COLOR=1 -I$(UNITY_PATH)
CFLAGS +=-I. -I./include -I../../include -I../../lib \
$(XCE_BASIC_CFLAGS) $(SSL_CFLAGS) $(JSON_CFLAGS) \
$(CYAML_CFLAGS) $(YAML_CFLAGS) $(UNITY_CFLAGS)
LDFLAGS += -L../../lib -lxce \
$(XCE_BASIC_LDFLAGS) $(SSL_LDFLAGS) $(JSON_LDFLAGS) \
$(CYAML_LDFLAGS) $(YAML_LDFLAGS)
ifneq (($WITH_NO_PIE),)
LDFLAGS += -no-pie
endif
TARGETS=libautoscaler.a test run_test
LIB_XCE = ../../lib/libxce.a
libscaler_SRCS=$(wildcard *.c)
libscaler_OBJS=$(libscaler_SRCS:.c=.o)
scaler_test_SRCS = $(wildcard testsuite/*.c) $(UNITY_PATH)/unity.c
scaler_test_OBJS = $(foreach var, $(scaler_test_SRCS:.c=.o), $(notdir $(var)))
.PHONY: all clean targets depend
all: depend $(TARGETS)
$(libscaler_SRCS): $(LIB_XCE)
libautoscaler.a: $(libscaler_OBJS)
$(AR) rcs $@ $(libscaler_OBJS)
$(RANLIB) $@
$(LIB_XCE):
$(MAKE) -C ../../lib
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
run_test: test
@echo
@echo "Running autoscaler unity tests"
@./test
@echo
test: libautoscaler.a ../../lib/libxce.a depend $(scaler_test_OBJS)
$(CC) -o $@ $(scaler_test_OBJS) \
-L. -lautoscaler $(LDFLAGS)
define mk_test_obj_rule
$(notdir $(1:.c=.o)): $(1) $(UNITY_PATH)/unity.h
$(CC) -c -o $$@ $(CFLAGS) $(1)
endef
$(foreach var,$(scaler_test_SRCS), $(eval $(call mk_test_obj_rule,$(var))))
depend: $(libscaler_SRCS)
CC="$(CC)" $(MKDEP) $(CFLAGS) $(libscaler_SRCS)
clean:
$(RM) $(TARGETS) *.o *~ .*~ .depend
-include .depend