diff options
author | Neil <nyamatongwe@gmail.com> | 2019-12-30 09:13:56 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2019-12-30 09:13:56 +1100 |
commit | f142bb942d54b1387dc887220072a3f798a285a6 (patch) | |
tree | 62b0b2f63ef05917e5832827cfcabef7c4ae3384 | |
parent | e384df880a1991212a6d38702dfbcf9d3c74bb0d (diff) | |
download | scintilla-mirror-f142bb942d54b1387dc887220072a3f798a285a6.tar.gz |
Use pattern rules instead of suffix rules as they are clearer.
Add a .PHONY target to avoid possible failure caused by file with same name.
-rw-r--r-- | gtk/makefile | 10 | ||||
-rw-r--r-- | win32/makefile | 4 |
2 files changed, 9 insertions, 5 deletions
diff --git a/gtk/makefile b/gtk/makefile index 54c9c0472..cde17ea80 100644 --- a/gtk/makefile +++ b/gtk/makefile @@ -7,6 +7,8 @@ # Builds for GTK+ 2 and 3. GTK 3 requires GTK3=1 on command line. # Also works with ming32-make on Windows. +.PHONY: all clean analyze depend + .SUFFIXES: .cxx .c .o .h .a .list srcdir ?= . @@ -84,17 +86,17 @@ all: $(COMPLIB) clean: $(DEL) *.o $(call normalize,$(COMPLIB)) *.plist -.cxx.o: +%.o: %.cxx $(CXX) $(CXX_ALL_FLAGS) $(CXXFLAGS) -c $< -.c.o: +%.o: %.c $(CC) $(DEFINES) $(INCLUDES) $(CONFIG_FLAGS) $(BASE_FLAGS) $(CFLAGS) -w -c $< GLIB_GENMARSHAL = glib-genmarshal GLIB_GENMARSHAL_FLAGS = --prefix=scintilla_marshal -.list.h: +%.h: %.list $(GLIB_GENMARSHAL) --header $(GLIB_GENMARSHAL_FLAGS) $< > $@ -.list.c: +%.c: %.list $(GLIB_GENMARSHAL) --body $(GLIB_GENMARSHAL_FLAGS) $< > $@ analyze: diff --git a/win32/makefile b/win32/makefile index 2c7700e7f..3dad7d045 100644 --- a/win32/makefile +++ b/win32/makefile @@ -5,6 +5,8 @@ # This makefile assumes Mingw-w64 GCC 9.0+ is used and changes will be needed to use other compilers. # Clang 9.0+ can be used with CLANG=1 on command line. +.PHONY: all clean analyze depend + .SUFFIXES: .cxx .c .o .h .a DIR_BIN=../bin @@ -64,7 +66,7 @@ all: $(COMPONENT) $(LEXCOMPONENT) $(LIBSCI) clean: $(DEL) *.exe *.o *.a *.obj *.dll *.res *.map *.plist -.cxx.o: +%.o: %.cxx $(CXX) $(CXX_ALL_FLAGS) $(CXXFLAGS) -c $< analyze: |