mwcxx/Makefile
2026-04-18 01:05:20 +09:00

34 lines
661 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
src/widget/base.o: src/widget/base.cc src/widget/baseauto.cc
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