|
9 | 9 | # ============================================================================ |
10 | 10 |
|
11 | 11 | RAYFORCE_GITHUB = https://github.com/RayforceDB/rayforce.git |
12 | | -RAYFORCE_LOCAL ?= ../rayforce |
13 | 12 | EXEC_DIR = $(shell pwd) |
14 | 13 | BUILD_DIR = $(EXEC_DIR)/build |
15 | 14 | DIST_DIR = $(EXEC_DIR)/dist |
@@ -159,11 +158,11 @@ pull: |
159 | 158 | @cp -r $(BUILD_DIR)/rayforce-c/core/* $(RAYFORCE_SRC)/ |
160 | 159 | @echo "✅ Sources pulled successfully" |
161 | 160 |
|
162 | | -# Copy rayforce sources from local directory |
| 161 | +# Copy rayforce sources from local directory (usage: make sync or RAYFORCE_SRC_DIR=path make sync) |
163 | 162 | sync: |
164 | 163 | @echo "🔄 Syncing from local rayforce directory..." |
165 | 164 | @mkdir -p $(RAYFORCE_SRC) |
166 | | - @cp -r $(RAYFORCE_LOCAL)/core/* $(RAYFORCE_SRC)/ |
| 165 | + @cp -r $${RAYFORCE_SRC_DIR:-../rayforce}/core/* $(RAYFORCE_SRC)/ |
167 | 166 | @echo "✅ Sources synced successfully" |
168 | 167 |
|
169 | 168 | # ============================================================================ |
@@ -224,7 +223,7 @@ wasm-standalone: CFLAGS = $(WASM_CFLAGS) |
224 | 223 | wasm-standalone: check-emcc $(DIST_DIR) $(BUILD_DIR)/lib$(TARGET).a $(WASM_MAIN_OBJ) |
225 | 224 | @mkdir -p $(BUILD_DIR)/examples |
226 | 225 | @cp -r $(BUILD_DIR)/rayforce-c/examples/* $(BUILD_DIR)/examples/ 2>/dev/null || \ |
227 | | - cp -r $(RAYFORCE_LOCAL)/examples/* $(BUILD_DIR)/examples/ 2>/dev/null || true |
| 226 | + cp -r $${RAYFORCE_SRC_DIR:-../rayforce}/examples/* $(BUILD_DIR)/examples/ 2>/dev/null || true |
228 | 227 | $(CC) -I$(SRC_DIR) $(CFLAGS) -o $(DIST_DIR)/$(TARGET)-standalone.js \ |
229 | 228 | $(ALL_OBJS) \ |
230 | 229 | -s "EXPORTED_FUNCTIONS=$(EXPORTED_FUNCTIONS)" \ |
|
0 commit comments