commit 4a702032597c3dcbabc08e069602705d09b9cb6b
parent 5c815690f16ec20100dae0822eac4178ed3d2ec2
Author: vaplv <vaplv@free.fr>
Date: Mon, 11 Apr 2022 21:45:53 +0200
Several Makefile fixes
Ensure that the shared objects are listed after the objects during the
link of the libaw.so library. Fix the uninstall and .config targets.
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
@@ -32,9 +32,9 @@ build_library: $(DEP) .config
$(OBJ): config.mk
libaw.so: $(OBJ)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ)
+ $(CC) $(CFLAGS) -o $@ $(OBJ) $(LDFLAGS)
-.config: Makefile
+.config: Makefile config.mk
@echo "Setup .config"
@if ! $(PKG_CONFIG) --atleast-version $(RSYS_VERSION) rsys; then \
echo "rsys $(RSYS_VERSION) not found"; exit 1; fi
@@ -63,15 +63,15 @@ install: build_library pkg
mkdir -p $(DESTDIR)$(PREFIX)/include/
mkdir -p $(DESTDIR)$(PREFIX)/share/doc/aw
cp libaw.so $(DESTDIR)$(PREFIX)/lib
- cp COPYING README.md $(DESTDIR)$(PREFIX)/share/doc/aw
cp aw.pc $(DESTDIR)$(PREFIX)/lib/pkgconfig
+ cp COPYING README.md $(DESTDIR)$(PREFIX)/share/doc/aw
cp src/aw.h $(DESTDIR)$(PREFIX)/include
uninstall:
rm -f $(DESTDIR)$(PREFIX)/lib/libaw.so
rm -f $(DESTDIR)$(PREFIX)/lib/pkgconfig/aw.pc
rm -f $(DESTDIR)$(PREFIX)/share/doc/aw/COPYING
- rm -f $(DESTDIR)$(PREFIX)/share/doc/aw/README
+ rm -f $(DESTDIR)$(PREFIX)/share/doc/aw/README.md
rm -f $(DESTDIR)$(PREFIX)/include/aw.h
################################################################################
@@ -124,7 +124,7 @@ all: build_library build_tests
clean:
@rm -f test_cbox.obj test_obj_cube.obj test_obj_plane.obj test_obj_squares.obj
- @rm -f mtl0.mtl test_mtl_common.mtl test_mtl_multi.mtl
+ @rm -f mtl0.mtl test_mtl_common.mtl test_mtl_multi.mtl
@rm -f $(OBJ) $(TEST_OBJ) libaw.so .test aw.pc .config
@rm -f $$(for i in $(TEST_SRC); do echo $${i} | sed 's/src\/\(.\{1,\}\).c$$/\1/'; done)