📄 makefile
字号:
###
### Copyright (c) 2001 Equator Technologies, Inc.
###
#
# Name of the target output
#
TARGET = sema
all: $(TARGET)
#
# Setup the compilers to use to build this
# application.
#
CC = ecc
#
# Definitions of object files to be made.
#
OBJS_VLX = vsema_vlx.o
OBJS = sema.o
SRC_VLX = vsema_vlx.c
SRC = sema.c
RUN = casim
#
# Generate C command line options for include library paths.
#
INCLUDES = vsema_vlx.h
#
# Setup the command-line options
#
DEFINES = -DDEBUG
LDFLAGS = -lvlx -lds
CFLAGS = -g $(INCLUDES)
ifeq ($(MAKECMDGOALS), vasm)
VLX_DIR = vlx_asm
else
VLX_DIR = vlx_c
DEFINES += -D_CONFIG_VLX_C
endif
#
# For regression testing
#
test: $(TARGET)
$(RUN) $(TARGET) > $(TARGET)_c.log
@rm -f $(TARGET)
@make vasm
$(RUN) $(TARGET) > $(TARGET)_asm.log
@if grep -q 'PASSED!!' $(TARGET)_c.log && grep -q 'PASSED!!' $(TARGET)_asm.log; then \
echo TEST PASSED vlx_ca/sema; \
fi;
#
# Default target vc uses vlx C, otherwise use vlx ASM
#
vc: $(TARGET)
vasm: $(TARGET)
$(TARGET): $(OBJS) $(OBJS_VLX)
$(CC) -o $(TARGET) $(OBJS) $(OBJS_VLX) $(LIBS) $(LDFLAGS)
#
# Suffix rules. Which files should be compiled
# or assembled by which compilers/asemblers.
#
$(OBJS) : $(SRC) $(OBJS_VLX)
$(CC) -c $(DEFINES) $(CFLAGS) $(SRC)
$(OBJS_VLX) : $(VLX_TARGET)
@make -C ./$(VLX_DIR)/ -f makefile
$(CC) -c $(DEFINES) $(CFLAGS) $(SRC_VLX)
clean:
rm -f *.o $(TARGET) $(TARGET)_*.log vsema_vlx.c vsema_vlx.h ./vlx_asm/vsema_vlx.[ch] ./vlx_c/vsema_vlx.[ch] ./vlx_c/*.s *.lst *.log *.trace dst ./vlx_c/*.lst
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -