File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 11PKG_CPPFLAGS = -I"../inst/include/" -I"../inst/include/quickjs" -D_GNU_SOURCE
2- # PKG_LIBS = libquickjs.o
2+ PKG_LIBS = ../inst/lib/$(R_ARCH)/ libquickjs.a
33
44ifeq ($(OS),Windows_NT)
55 DLL := .dll
3232 endif
3333endif
3434
35- CPP_SOURCES = quickjsr.cpp init.cpp
36- SOURCES = $(CPP_SOURCES)
37- OBJECTS = $(CPP_SOURCES:.cpp=.o) libquickjs.o
35+ SOURCES = quickjsr.cpp init.cpp
36+ OBJECTS = $(SOURCES:.cpp=.o)
3837
38+ all: $(SHLIB) clean
3939$(SHLIB): $(OBJECTS)
4040$(OBJECTS): build-static
4141
4242build-static:
4343 @mkdir -p ../inst/include/quickjs
4444 @cp $(wildcard quickjs/*.h) ../inst/include/quickjs
45- # $(R_CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -funsigned-char -std=gnu11 -c libquickjs.c
46- # @mkdir -p ../inst/lib/$(R_ARCH)
47- # $(AR) -rs ../inst/lib/$(R_ARCH)/libquickjs.a libquickjs.o
45+ $(R_CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -funsigned-char -std=gnu11 -c libquickjs.c
46+ @mkdir -p ../inst/lib/$(R_ARCH)
47+ $(AR) -rs ../inst/lib/$(R_ARCH)/libquickjs.a libquickjs.o
4848
49- clean:
50- $(RM) libquickjs.o $(OBJECTS) QuickJSR$(DLL)
49+ clean: $(SHLIB)
50+ $(RM) libquickjs.o $(OBJECTS)
5151 $(RM) -r ../inst/lib ../inst/include/quickjs
You can’t perform that action at this time.
0 commit comments