Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (49 loc) · 1.63 KB
/
Copy pathMakefile
File metadata and controls
56 lines (49 loc) · 1.63 KB
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
# Makefile for common hyperliquid-cpp tasks
.PHONY: help build examples clean rebuild test run-examples
help:
@echo "Hyperliquid C++ SDK - Common Commands"
@echo ""
@echo " make build - Build the hyperliquid library"
@echo " make examples - Build all examples"
@echo " make clean - Clean build directory"
@echo " make rebuild - Clean and rebuild everything"
@echo " make run-examples - Show how to run examples"
@echo ""
@echo "To compile a custom .cpp file:"
@echo " ./compile.sh your_file.cpp"
build:
@mkdir -p build
@cd build && cmake .. && make hyperliquid
@echo "✓ Library built successfully"
examples: build
@cd build && make
@echo "✓ All examples built successfully"
@echo ""
@echo "Run examples from build/examples/ directory:"
@echo " ./build/examples/basic_order"
@echo " ./build/examples/basic_market_order"
@echo " ./build/examples/query_positions <address>"
@echo " ./build/examples/bulk_orders"
@echo " ./build/examples/order"
clean:
@rm -rf build
@echo "✓ Build directory cleaned"
rebuild: clean build
@echo "✓ Rebuild complete"
run-examples:
@echo "Available examples:"
@echo ""
@echo "1. Basic Order (limit order):"
@echo " export HYPERLIQUID_PRIVATE_KEY='0x...'"
@echo " ./build/examples/basic_order"
@echo ""
@echo "2. Market Order:"
@echo " export HYPERLIQUID_PRIVATE_KEY='0x...'"
@echo " ./build/examples/basic_market_order"
@echo ""
@echo "3. Query Positions:"
@echo " ./build/examples/query_positions 0xYourAddress"
@echo ""
@echo "4. Bulk Orders:"
@echo " export HYPERLIQUID_PRIVATE_KEY='0x...'"
@echo " ./build/examples/bulk_orders"