1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196
|
.PHONY: all objdir clean realclean distclean
# CORE VARIABLES
MODULE := ec
CONFIG := bootstrap
ifndef COMPILER
COMPILER := default
endif
TARGET_TYPE = staticlib
# FLAGS
ECFLAGS =
ifndef DEBIAN_PACKAGE
CFLAGS =
LDFLAGS =
endif
PRJ_CFLAGS =
CECFLAGS =
OFLAGS =
LIBS =
ifdef DEBUG
NOSTRIP := y
endif
CONSOLE = -mwindows
# INCLUDES
_CF_DIR = ../../../
include $(_CF_DIR)crossplatform.mk
include $(_CF_DIR)default.cf
# POST-INCLUDES VARIABLES
OBJ = obj/$(CONFIG).$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/
RES =
TARGET = obj/$(CONFIG).$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)/$(LP)ecBootstrap$(A)
OBJECTS = \
$(OBJ)ast.o \
$(OBJ)copy.o \
$(OBJ)dbpass.o \
$(OBJ)ec.main.o \
$(OBJ)ecdefs.o \
$(OBJ)expression.o \
$(OBJ)firstPass.o \
$(OBJ)freeAst.o \
$(OBJ)grammar.o \
$(OBJ)lexer.o \
$(OBJ)loadSymbols.o \
$(OBJ)output.o \
$(OBJ)pass0.o \
$(OBJ)pass1.o \
$(OBJ)pass15.o \
$(OBJ)pass16.o \
$(OBJ)pass2.o \
$(OBJ)pass3.o \
$(OBJ)shortcuts.o \
$(OBJ)type.o \
$(OBJ)bsl.o
SOURCES = \
bootstrap/ast.c \
bootstrap/copy.c \
bootstrap/dbpass.c \
bootstrap/ec.main.c \
bootstrap/ecdefs.c \
bootstrap/expression.c \
bootstrap/firstPass.c \
bootstrap/freeAst.c \
bootstrap/grammar.c \
bootstrap/lexer.c \
bootstrap/loadSymbols.c \
bootstrap/output.c \
bootstrap/pass0.c \
bootstrap/pass1.c \
bootstrap/pass15.c \
bootstrap/pass16.c \
bootstrap/pass2.c \
bootstrap/pass3.c \
bootstrap/shortcuts.c \
bootstrap/type.c \
../bsl.c
LIBS += $(SHAREDLIB) $(EXECUTABLE) $(LINKOPT)
ifndef STATIC_LIBRARY_TARGET
LIBS +=
endif
PRJ_CFLAGS += \
$(if $(DEBUG), -g, -O2 -ffast-math) $(FPIC) -w \
-DECERE_STATIC
ECFLAGS += \
-nolinenumbers
CECFLAGS += -cpp $(_CPP)
# TARGETS
all: objdir $(TARGET)
objdir:
$(if $(wildcard $(OBJ)),,$(call mkdir,$(OBJ)))
$(TARGET): $(SOURCES) $(RESOURCES) | objdir $(SYMBOLS) $(OBJECTS)
$(AR) rcs $(TARGET) $(OBJECTS) $(LIBS)
# OBJECT RULES
$(OBJ)ast.o: bootstrap/ast.c
$(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/ast.c -o $(OBJ)ast.o
$(OBJ)copy.o: bootstrap/copy.c
$(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/copy.c -o $(OBJ)copy.o
$(OBJ)dbpass.o: bootstrap/dbpass.c
$(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/dbpass.c -o $(OBJ)dbpass.o
$(OBJ)ec.main.o: bootstrap/ec.main.c
$(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/ec.main.c -o $(OBJ)ec.main.o
$(OBJ)ecdefs.o: bootstrap/ecdefs.c
$(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/ecdefs.c -o $(OBJ)ecdefs.o
$(OBJ)expression.o: bootstrap/expression.c
$(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/expression.c -o $(OBJ)expression.o
$(OBJ)firstPass.o: bootstrap/firstPass.c
$(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/firstPass.c -o $(OBJ)firstPass.o
$(OBJ)freeAst.o: bootstrap/freeAst.c
$(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/freeAst.c -o $(OBJ)freeAst.o
$(OBJ)grammar.o: bootstrap/grammar.c
$(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/grammar.c -o $(OBJ)grammar.o
$(OBJ)lexer.o: bootstrap/lexer.c
$(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/lexer.c -o $(OBJ)lexer.o
$(OBJ)loadSymbols.o: bootstrap/loadSymbols.c
$(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/loadSymbols.c -o $(OBJ)loadSymbols.o
$(OBJ)output.o: bootstrap/output.c
$(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/output.c -o $(OBJ)output.o
$(OBJ)pass0.o: bootstrap/pass0.c
$(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/pass0.c -o $(OBJ)pass0.o
$(OBJ)pass1.o: bootstrap/pass1.c
$(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/pass1.c -o $(OBJ)pass1.o
$(OBJ)pass15.o: bootstrap/pass15.c
$(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/pass15.c -o $(OBJ)pass15.o
$(OBJ)pass16.o: bootstrap/pass16.c
$(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/pass16.c -o $(OBJ)pass16.o
$(OBJ)pass2.o: bootstrap/pass2.c
$(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/pass2.c -o $(OBJ)pass2.o
$(OBJ)pass3.o: bootstrap/pass3.c
$(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/pass3.c -o $(OBJ)pass3.o
$(OBJ)shortcuts.o: bootstrap/shortcuts.c
$(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/shortcuts.c -o $(OBJ)shortcuts.o
$(OBJ)type.o: bootstrap/type.c
$(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/type.c -o $(OBJ)type.o
$(OBJ)bsl.o: ../bsl.c
$(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c ../bsl.c -o $(OBJ)bsl.o
clean: objdir
$(call rm,$(TARGET))
$(call rm,$(OBJECTS))
realclean: objdir
$(call rmr,$(OBJ))
distclean:
$(_MAKE) -f $(_CF_DIR)Cleanfile distclean distclean_all_subdirs
Makefile: ;
$(_CF_DIR)crossplatform.mk: ;
$(_CF_DIR)default.cf: ;
|