Skip to content

Commit

Permalink
xsnap-ava -> xsnap-worker
Browse files Browse the repository at this point in the history
  • Loading branch information
phoddie committed Aug 5, 2021
1 parent 94a7a88 commit 378b66f
Show file tree
Hide file tree
Showing 8 changed files with 920 additions and 1,785 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,37 @@
%.o : %.c

GOAL ?= debug
NAME = xsnap
NAME = xsnap-worker
ifneq ($(VERBOSE),1)
MAKEFLAGS += --silent
endif

MODDABLE = $(CURDIR)/../../moddable
XS_DIR = $(MODDABLE)/xs
BUILD_DIR = $(CURDIR)/../../build
TLS_DIR = $(CURDIR)/../../src

# BUILD_DIR = $(MODDABLE)/build
# TLS_DIR = ../../sources

XS_DIR = $(MODDABLE)/xs

BIN_DIR = $(BUILD_DIR)/bin/lin/$(GOAL)
INC_DIR = $(XS_DIR)/includes
PLT_DIR = $(XS_DIR)/platforms
SRC_DIR = $(XS_DIR)/sources
TLS_DIR = ../../src
TMP_DIR = $(BUILD_DIR)/tmp/lin/$(GOAL)/$(NAME)

MACOS_ARCH ?= -arch i386
MACOS_VERSION_MIN ?= -mmacosx-version-min=10.7

C_OPTIONS = \
-fno-common \
-DINCLUDE_XSPLATFORM \
-DXSPLATFORM=\"xsnapPlatform.h\" \
-DXSNAP_VERSION=\"$(XSNAP_VERSION)\" \
-DXSNAP_TEST_RECORD=0 \
-DmxMetering=1 \
-DmxParse=1 \
-DmxRun=1 \
-DmxSloppy=1 \
-DmxSnapshot=1 \
-DmxMetering=1 \
-DmxRegExpUnicodePropertyEscapes=1 \
-I$(INC_DIR) \
-I$(PLT_DIR) \
Expand Down Expand Up @@ -96,7 +98,7 @@ OBJECTS = \
$(TMP_DIR)/xsdtoa.o \
$(TMP_DIR)/xsre.o \
$(TMP_DIR)/xsnapPlatform.o \
$(TMP_DIR)/$(NAME).o
$(TMP_DIR)/xsnap-worker.o

VPATH += $(SRC_DIR) $(TLS_DIR)

Expand All @@ -119,6 +121,7 @@ $(OBJECTS): $(SRC_DIR)/xsCommon.h
$(OBJECTS): $(SRC_DIR)/xsAll.h
$(OBJECTS): $(SRC_DIR)/xsScript.h
$(OBJECTS): $(SRC_DIR)/xsSnapshot.h
$(OBJECTS): $(INC_DIR)/xs.h
$(TMP_DIR)/%.o: %.c
@echo "#" $(NAME) $(GOAL) ": cc" $(<F)
$(CC) $< $(C_OPTIONS) -c -o $@
Expand Down
10 changes: 4 additions & 6 deletions xsnap/makefiles/lin/xsnap.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,17 @@ ifneq ($(VERBOSE),1)
MAKEFLAGS += --silent
endif

XS_DIR = $(MODDABLE)/xs
BUILD_DIR = $(MODDABLE)/build
TLS_DIR = ../../sources

XS_DIR = $(MODDABLE)/xs

BIN_DIR = $(BUILD_DIR)/bin/lin/$(GOAL)
INC_DIR = $(XS_DIR)/includes
PLT_DIR = $(XS_DIR)/platforms
SRC_DIR = $(XS_DIR)/sources
TLS_DIR = ../../sources
TMP_DIR = $(BUILD_DIR)/tmp/lin/$(GOAL)/$(NAME)

MACOS_ARCH ?= -arch i386
MACOS_VERSION_MIN ?= -mmacosx-version-min=10.7

C_OPTIONS = \
-fno-common \
-DINCLUDE_XSPLATFORM \
Expand Down Expand Up @@ -109,7 +107,7 @@ $(BIN_DIR):
$(BIN_DIR)/$(NAME): $(OBJECTS)
@echo "#" $(NAME) $(GOAL) ": cc" $(@F)
$(CC) $(LINK_OPTIONS) $(OBJECTS) $(LIBRARIES) -o $@

$(OBJECTS): $(TLS_DIR)/xsnap.h
$(OBJECTS): $(TLS_DIR)/xsnapPlatform.h
$(OBJECTS): $(PLT_DIR)/xsPlatform.h
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,27 @@
%.o : %.c

GOAL ?= debug
NAME = xsnap
NAME = xsnap-worker
ifneq ($(VERBOSE),1)
MAKEFLAGS += --silent
endif

MODDABLE = $(CURDIR)/../../moddable
XS_DIR = $(MODDABLE)/xs
BUILD_DIR = $(CURDIR)/../../build
TLS_DIR = $(CURDIR)/../../src

# BUILD_DIR = $(MODDABLE)/build
# TLS_DIR = ../../sources

XS_DIR = $(MODDABLE)/xs

BIN_DIR = $(BUILD_DIR)/bin/mac/$(GOAL)
INC_DIR = $(XS_DIR)/includes
PLT_DIR = $(XS_DIR)/platforms
SRC_DIR = $(XS_DIR)/sources
TLS_DIR = ../../src
TMP_DIR = $(BUILD_DIR)/tmp/mac/$(GOAL)/$(NAME)

# MACOS_ARCH ?= -arch i386
MACOS_ARCH ?=
MACOS_ARCH ?=
MACOS_VERSION_MIN ?= -mmacosx-version-min=10.7

C_OPTIONS = \
Expand All @@ -29,11 +32,12 @@ C_OPTIONS = \
-DINCLUDE_XSPLATFORM \
-DXSPLATFORM=\"xsnapPlatform.h\" \
-DXSNAP_VERSION=\"$(XSNAP_VERSION)\" \
-DXSNAP_TEST_RECORD=0 \
-DmxMetering=1 \
-DmxParse=1 \
-DmxRun=1 \
-DmxSloppy=1 \
-DmxSnapshot=1 \
-DmxMetering=1 \
-DmxRegExpUnicodePropertyEscapes=1 \
-I$(INC_DIR) \
-I$(PLT_DIR) \
Expand Down Expand Up @@ -105,7 +109,7 @@ OBJECTS = \
$(TMP_DIR)/xsdtoa.o \
$(TMP_DIR)/xsre.o \
$(TMP_DIR)/xsnapPlatform.o \
$(TMP_DIR)/$(NAME).o
$(TMP_DIR)/xsnap-worker.o

VPATH += $(SRC_DIR) $(TLS_DIR)

Expand All @@ -128,6 +132,7 @@ $(OBJECTS): $(SRC_DIR)/xsCommon.h
$(OBJECTS): $(SRC_DIR)/xsAll.h
$(OBJECTS): $(SRC_DIR)/xsScript.h
$(OBJECTS): $(SRC_DIR)/xsSnapshot.h
$(OBJECTS): $(INC_DIR)/xs.h
$(TMP_DIR)/%.o: %.c
@echo "#" $(NAME) $(GOAL) ": cc" $(<F)
$(CC) $< $(C_OPTIONS) -c -o $@
Expand Down
8 changes: 4 additions & 4 deletions xsnap/makefiles/mac/xsnap.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ ifneq ($(VERBOSE),1)
MAKEFLAGS += --silent
endif

XS_DIR = $(MODDABLE)/xs
BUILD_DIR = $(MODDABLE)/build
TLS_DIR = ../../sources

XS_DIR = $(MODDABLE)/xs

BIN_DIR = $(BUILD_DIR)/bin/mac/$(GOAL)
INC_DIR = $(XS_DIR)/includes
PLT_DIR = $(XS_DIR)/platforms
SRC_DIR = $(XS_DIR)/sources
TLS_DIR = ../../sources
TMP_DIR = $(BUILD_DIR)/tmp/mac/$(GOAL)/$(NAME)

# MACOS_ARCH ?= -arch i386
MACOS_ARCH ?=
MACOS_VERSION_MIN ?= -mmacosx-version-min=10.7

Expand Down Expand Up @@ -118,7 +118,7 @@ $(BIN_DIR):
$(BIN_DIR)/$(NAME): $(OBJECTS)
@echo "#" $(NAME) $(GOAL) ": cc" $(@F)
$(CC) $(LINK_OPTIONS) $(LIBRARIES) $(OBJECTS) -o $@

$(OBJECTS): $(TLS_DIR)/xsnap.h
$(OBJECTS): $(TLS_DIR)/xsnapPlatform.h
$(OBJECTS): $(PLT_DIR)/xsPlatform.h
Expand Down
Loading

0 comments on commit 378b66f

Please sign in to comment.