mwcxx/Makefile

34 lines
658 B
Makefile
Raw Normal View History

2026-04-16 14:27:13 +09:00
MILSKO = ../milsko
XEMIL = ../xemil
2026-04-17 19:42:14 +09:00
CXX = g++
2026-04-16 14:27:13 +09:00
LIB = lib
SO = .so
EXEC =
2026-04-17 19:42:14 +09:00
.PHONY: all format clean
2026-04-16 15:01:47 +09:00
.SUFFIXES: .cxx .o
2026-04-16 14:27:13 +09:00
all: libMwCXX$(SO)
2026-04-17 19:42:14 +09:00
format:
clang-format --verbose -i `find . -name "*.cxx" -or -name "*.h"`
OBJS = src/core.o src/widget/base.o
2026-04-16 14:27:13 +09:00
include objs.mk
2026-04-17 19:42:14 +09:00
src/widget/base.o: src/widget/base.cxx src/widget/baseauto.cxx
2026-04-16 14:27:13 +09:00
bindgen$(EXEC): bindgen.o
2026-04-16 15:01:47 +09:00
$(CXX) -L$(XEMIL)/lib -L$(XEMIL)/src -o $@ bindgen.o -lxemil
2026-04-16 14:27:13 +09:00
libMwCXX$(SO): $(OBJS)
$(CXX) -shared -L$(MILSKO)/lib -L$(MILSKO)/src -o $@ $(OBJS) -lMw
.cxx.o:
2026-04-17 19:42:14 +09:00
$(CXX) -fPIC -c -Iinclude -I$(MILSKO)/include -I$(XEMIL)/include -o $@ $<
2026-04-16 14:27:13 +09:00
clean:
2026-04-17 19:42:14 +09:00
rm -f *.so *.dll *.o */*.o */*/*.o *.exe bindgen.exe