diff options
| author | Benoit Germain <benoit.germain@ubisoft.com> | 2025-03-13 16:09:03 +0100 |
|---|---|---|
| committer | Benoit Germain <benoit.germain@ubisoft.com> | 2025-03-13 16:09:03 +0100 |
| commit | 24c8215fa05142cc2461efacc1187ef443450af9 (patch) | |
| tree | cf03c78028abc7f0c0973328f9580e5acc7b4cc9 /deep_userdata_example/DUE.makefile | |
| parent | 3ad53d3db2215aa50517a646296b9c25cb3155e3 (diff) | |
| download | lanes-24c8215fa05142cc2461efacc1187ef443450af9.tar.gz lanes-24c8215fa05142cc2461efacc1187ef443450af9.tar.bz2 lanes-24c8215fa05142cc2461efacc1187ef443450af9.zip | |
More work on Makefiles
* renamed makefiles:
- Shared.mk → Shared.makefile
- src/Makefile → src/Lanes.makefile
- unit_tests/Makefile → unit_tests/UnitTests.makefile
- deep_userdata_example/Makefile → deep_userdata_example/DUE.makefile
* Add a makefile for deep_userdata_example
* added a target 'unit_tests' to build them (not running them yet)
* plus some minor internal improvements
Diffstat (limited to 'deep_userdata_example/DUE.makefile')
| -rw-r--r-- | deep_userdata_example/DUE.makefile | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/deep_userdata_example/DUE.makefile b/deep_userdata_example/DUE.makefile new file mode 100644 index 0000000..8fcc89e --- /dev/null +++ b/deep_userdata_example/DUE.makefile | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | # | ||
| 2 | # Lanes/deep_userdata_example/DUE.makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | include ../Shared.makefile | ||
| 6 | |||
| 7 | _MODULE=deep_userdata_example.$(_SO) | ||
| 8 | |||
| 9 | _SRC:=$(wildcard *.cpp) ../src/compat.cpp ../src/deep.cpp | ||
| 10 | |||
| 11 | _OBJ:=$(_SRC:.cpp=.o) | ||
| 12 | |||
| 13 | #--- | ||
| 14 | all: $(_MODULE) | ||
| 15 | $(info CC: $(CC)) | ||
| 16 | $(info _MODULE: $(_MODULE)) | ||
| 17 | $(info _SRC: $(_SRC)) | ||
| 18 | |||
| 19 | _pch.hpp.gch: ../src/_pch.hpp | ||
| 20 | $(CC) -I "../.." $(CFLAGS) -x c++-header $< -o _pch.hpp.gch | ||
| 21 | |||
| 22 | %.o: %.cpp _pch.hpp.gch DUE.makefile | ||
| 23 | $(CC) -I "../.." $(CFLAGS) -c $< | ||
| 24 | |||
| 25 | # Note: Don't put $(LUA_LIBS) ahead of $^; MSYS will not like that (I think) | ||
| 26 | # | ||
| 27 | $(_MODULE): $(_OBJ) | ||
| 28 | $(CC) $(LIBFLAG) $^ $(LIBS) $(LUA_LIBS) -o $@ | ||
| 29 | |||
| 30 | install: | ||
| 31 | install -m 644 $(_MODULE) $(LUA_LIBDIR)/ | ||
| 32 | |||
| 33 | clean: | ||
| 34 | -rm -rf $(_MODULE) *.o *.map *.gch | ||
| 35 | |||
| 36 | .PHONY: all clean | ||
