764d97e4a9542ea415ac7d5ad212a1a771aafdfa
[modules.git] / Makefile
1 #CXXFLAGS = -fmodules-ts -std=c++20
2 #CXX = g++
3
4 CXX = clang++
5 CXXFLAGS = -std=c++20 -fimplicit-modules -fprebuilt-module-path=. -fmodules-cache-path=foo
6
7 APP = hellomodules
8 OBJS = main.o helloworld.o
9 MODS = helloworld.pcm
10
11 all: $(APP)
12
13 clean:
14         rm -f $(APP)
15         rm -f $(OBJS)
16         rm -f $(MODS)
17
18 $(APP): $(OBJS)
19         $(CXX) $(CXXFLAGS) -o $@ $?
20
21 main.o: main.cc $(MODS)
22 helloworld.o: helloworld.cc
23
24 helloworld.pcm: helloworld.cc
25         $(CXX) $(CXXFLAGS) -Xclang -emit-module-interface -c helloworld.cc -o helloworld.pcm