mirror of
https://github.com/janet-lang/janet
synced 2024-12-25 16:00:27 +00:00
commit
30cb01e2f0
7
Makefile
7
Makefile
@ -31,6 +31,7 @@ JANET_BUILD?="\"$(shell git log --pretty=format:'%h' -n 1)\""
|
|||||||
CLIBS=-lm
|
CLIBS=-lm
|
||||||
JANET_TARGET=build/janet
|
JANET_TARGET=build/janet
|
||||||
JANET_LIBRARY=build/libjanet.so
|
JANET_LIBRARY=build/libjanet.so
|
||||||
|
JANET_STATIC_LIBRARY=build/libjanet.a
|
||||||
JANET_PATH?=$(PREFIX)/lib/janet
|
JANET_PATH?=$(PREFIX)/lib/janet
|
||||||
MANPATH?=$(PREFIX)/share/man/man1/
|
MANPATH?=$(PREFIX)/share/man/man1/
|
||||||
DEBUGGER=gdb
|
DEBUGGER=gdb
|
||||||
@ -52,7 +53,7 @@ ifeq ($(UNAME),Haiku)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
$(shell mkdir -p build/core build/mainclient build/webclient build/boot)
|
$(shell mkdir -p build/core build/mainclient build/webclient build/boot)
|
||||||
all: $(JANET_TARGET) $(JANET_LIBRARY)
|
all: $(JANET_TARGET) $(JANET_LIBRARY) $(JANET_STATIC_LIBRARY)
|
||||||
|
|
||||||
######################
|
######################
|
||||||
##### Name Files #####
|
##### Name Files #####
|
||||||
@ -155,6 +156,9 @@ $(JANET_TARGET): $(JANET_CORE_OBJECTS) $(JANET_MAINCLIENT_OBJECTS)
|
|||||||
$(JANET_LIBRARY): $(JANET_CORE_OBJECTS)
|
$(JANET_LIBRARY): $(JANET_CORE_OBJECTS)
|
||||||
$(CC) $(LDFLAGS) $(CFLAGS) -shared -o $@ $^ $(CLIBS)
|
$(CC) $(LDFLAGS) $(CFLAGS) -shared -o $@ $^ $(CLIBS)
|
||||||
|
|
||||||
|
$(JANET_STATIC_LIBRARY): $(JANET_CORE_OBJECTS)
|
||||||
|
$(AR) rcs $@ $^
|
||||||
|
|
||||||
######################
|
######################
|
||||||
##### Emscripten #####
|
##### Emscripten #####
|
||||||
######################
|
######################
|
||||||
@ -287,6 +291,7 @@ install: $(JANET_TARGET) build/version.txt
|
|||||||
mkdir -p $(JANET_PATH)
|
mkdir -p $(JANET_PATH)
|
||||||
mkdir -p $(LIBDIR)
|
mkdir -p $(LIBDIR)
|
||||||
cp $(JANET_LIBRARY) $(LIBDIR)/libjanet.so.$(shell cat build/version.txt)
|
cp $(JANET_LIBRARY) $(LIBDIR)/libjanet.so.$(shell cat build/version.txt)
|
||||||
|
cp $(JANET_STATIC_LIBRARY) $(LIBDIR)/libjanet.a
|
||||||
ln -sf $(SONAME) $(LIBDIR)/libjanet.so
|
ln -sf $(SONAME) $(LIBDIR)/libjanet.so
|
||||||
ln -sf libjanet.so.$(shell cat build/version.txt) $(LIBDIR)/$(SONAME)
|
ln -sf libjanet.so.$(shell cat build/version.txt) $(LIBDIR)/$(SONAME)
|
||||||
cp tools/cook.janet $(JANET_PATH)
|
cp tools/cook.janet $(JANET_PATH)
|
||||||
|
Loading…
Reference in New Issue
Block a user