mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
build repl
This commit is contained in:
@@ -7,11 +7,16 @@ LIBS+=-ltoy
|
|||||||
ODIR = obj
|
ODIR = obj
|
||||||
SRC = $(wildcard *.c)
|
SRC = $(wildcard *.c)
|
||||||
OBJ = $(addprefix $(ODIR)/,$(SRC:.c=.o))
|
OBJ = $(addprefix $(ODIR)/,$(SRC:.c=.o))
|
||||||
|
OUTNAME=toy
|
||||||
OUT=../$(TOY_OUTDIR)/toyrepl
|
OUT=../$(TOY_OUTDIR)/toyrepl
|
||||||
|
|
||||||
all: $(OBJ)
|
all: $(OBJ)
|
||||||
|
ifeq ($(shell uname),Darwin)
|
||||||
|
cp $(PWD)/$(TOY_OUTDIR)/lib$(OUTNAME).dylib /usr/local/lib/
|
||||||
|
$(CC) -DTOY_IMPORT $(CFLAGS) -o $(OUT) $(OBJ) $(LIBS)
|
||||||
|
else
|
||||||
$(CC) -DTOY_IMPORT $(CFLAGS) -o $(OUT) $(OBJ) -L$(realpath $(shell pwd)/../$(TOY_OUTDIR)) $(LIBS)
|
$(CC) -DTOY_IMPORT $(CFLAGS) -o $(OUT) $(OBJ) -L$(realpath $(shell pwd)/../$(TOY_OUTDIR)) $(LIBS)
|
||||||
|
endif
|
||||||
|
|
||||||
$(OBJ): | $(ODIR)
|
$(OBJ): | $(ODIR)
|
||||||
|
|
||||||
@@ -25,3 +30,4 @@ $(ODIR)/%.o: %.c
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(ODIR)
|
$(RM) $(ODIR)
|
||||||
|
rm /usr/local/lib/lib$(OUTNAME).dylib
|
||||||
|
|||||||
Reference in New Issue
Block a user