#CXXFLAGS = -fmodules-ts -std=c++20 #CXX = g++ CXX = clang++ CXXFLAGS = -std=c++20 -fimplicit-modules -fprebuilt-module-path=. -fmodules-cache-path=foo APP = hellomodules OBJS = main.o helloworld.o MODS = helloworld.pcm all: $(APP) clean: rm -f $(APP) rm -f $(OBJS) rm -f $(MODS) $(APP): $(OBJS) $(CXX) $(CXXFLAGS) -o $@ $? main.o: main.cc $(MODS) helloworld.o: helloworld.cc helloworld.pcm: helloworld.cc $(CXX) $(CXXFLAGS) -Xclang -emit-module-interface -c helloworld.cc -o helloworld.pcm