Skip to content

Commit

Permalink
Update Makefile to use Nimble for compilation and dependency management
Browse files Browse the repository at this point in the history
  • Loading branch information
AtilMohAmine committed Sep 10, 2024
1 parent 52e3c6d commit e1183e4
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Define the compiler and flags
NIM = nim
NIMBLE = nimble
NIM_FLAGS = -d:release --mm:orc --threads:on --opt:speed
LDFLAGS = -ljavascriptcoregtk-4.0
CFLAGS = -I/usr/include/webkitgtk-4.0
Expand All @@ -11,15 +11,19 @@ SRC = ./src/runtime.nim
# Default target
all: compile

# Install dependencies
deps:
$(NIMBLE) install -y

# Compile the source code
compile:
@mkdir -p $(OUTDIR)
$(NIM) c $(NIM_FLAGS) --passL:"$(LDFLAGS)" --passC:"$(CFLAGS)" --outdir:$(OUTDIR) --out:izem $(SRC)
$(NIMBLE) c $(NIM_FLAGS) --passL:"$(LDFLAGS)" --passC:"$(CFLAGS)" --outdir:$(OUTDIR) --out:izem $(SRC)

# Compile the source code for debugging
debug:
@mkdir -p $(OUTDIR)
$(NIM) c -d:debug --passL:"$(LDFLAGS)" --passC:"$(CFLAGS)" --outdir:$(OUTDIR) --out:izem $(SRC)
$(NIMBLE) c -d:debug --passL:"$(LDFLAGS)" --passC:"$(CFLAGS)" --outdir:$(OUTDIR) --out:izem $(SRC)

# Phony targets
.PHONY: all compile debug
.PHONY: all deps compile debug

0 comments on commit e1183e4

Please sign in to comment.