mwcxx/Makefile
2026-04-20 05:29:42 +09:00

35 lines
715 B
Makefile

MILSKO = ../milsko
XEMIL = ../xemil
CXX = g++
LIB = lib
SO = .so
EXEC =
.PHONY: all format clean
.SUFFIXES: .cc .o
all: libMwCXX$(SO)
format:
clang-format --verbose -i `find . -name "*.cc" -or -name "*.h"`
OBJS = src/core.o src/widget/base.o
include objs.mk
test$(EXEC): test.o libMwCXX$(SO)
$(CXX) -L. -Wl,-R$(MILSKO)/src -Wl,-R$(MILSKO)/lib -Wl,-R. -o $@ test.o -lMwCXX
bindgen$(EXEC): bindgen.o
$(CXX) -L$(XEMIL)/lib -L$(XEMIL)/src -o $@ bindgen.o -lxemil
libMwCXX$(SO): $(OBJS)
$(CXX) -shared -L$(MILSKO)/lib -L$(MILSKO)/src -o $@ $(OBJS) -lMw
.cc.o:
$(CXX) -fPIC -c -Iinclude -I$(MILSKO)/include -I$(XEMIL)/include -o $@ $<
clean:
rm -f *.so *.dll *.o */*.o */*/*.o *.exe bindgen.exe bindgen