annotate kdiff3/diff_ext_for_kdiff3/Makefile @ 113:7bca1f1340f6 tip

Build fixes for Xcode 10 / Qt 5.12
author Chris Cannam
date Mon, 17 Dec 2018 11:13:01 +0000
parents 08ea9b86c12c
children
rev   line source
joachim99@75 1 # Project: diff_ext
joachim99@75 2 # Generates diff_ext_for_kdiff3.dll with gcc.
joachim99@75 3 # Can be used for Cygwin and MingW (MingW ignores -mno-cygwin)
joachim99@75 4 #
joachim99@75 5 PROJ := diff_ext_for_kdiff3
joachim99@75 6
joachim99@75 7 CXX ?= g++.exe
joachim99@75 8
joachim99@75 9 ifdef DEBUG
joachim99@75 10 CXXFLAGS ?= -g
joachim99@75 11 else
joachim99@75 12 CXXFLAGS ?= -Os
joachim99@75 13 LDFLAGS += -s
joachim99@75 14 endif
joachim99@75 15 CXXFLAGS += -ansi -pedantic -Wall -W -D_UNICODE -DUNICODE
joachim99@75 16
joachim99@75 17 LIBS := -luuid -lole32
joachim99@75 18 DEFFILE = $(PROJ).def
joachim99@75 19 STATICLIB = $(PROJ).a
joachim99@75 20 EXPLIB = $(PROJ).exp
joachim99@75 21
joachim99@75 22 SRC-CXX = $(wildcard *.cpp)
joachim99@75 23 SRC-RC = $(wildcard *.rc)
joachim99@75 24
joachim99@75 25 OBJ := $(SRC-CXX:.cpp=.o)
joachim99@75 26 RES := $(SRC-RC:.rc=.res)
joachim99@75 27 OBJ += $(RES)
joachim99@75 28 DLL := $(PROJ).dll
joachim99@75 29
joachim99@75 30 .PHONY: all clean
joachim99@75 31
joachim99@75 32 .SUFFIXES: .rc .res
joachim99@75 33
joachim99@75 34 all: .depend $(DLL)
joachim99@75 35
joachim99@75 36 debug:
joachim99@75 37 $(MAKE) DEBUG=YES UNICODE=YES
joachim99@75 38
joachim99@75 39 release:
joachim99@75 40 $(MAKE)
joachim99@75 41
joachim99@75 42 .depend: Makefile $(SRC-RC) $(SRC-CXX)
joachim99@75 43 $(CXX) -M $(CXXFLAGS) $(SRC-RC) $(SRC-CXX) > .depend
joachim99@75 44
joachim99@75 45 include .depend
joachim99@75 46
joachim99@75 47 clean: clean-custom
joachim99@75 48 ${RM} $(OBJ) $(DLL) ${EXPLIB} $(STATICLIB)
joachim99@75 49
joachim99@75 50 $(DLL): $(OBJ)
joachim99@75 51 dllwrap.exe \
joachim99@75 52 --mno-cygwin \
joachim99@75 53 --def $(DEFFILE) \
joachim99@75 54 --output-exp ${EXPLIB} \
joachim99@75 55 --driver-name c++ -L/usr/local/lib -L/usr/lib/mingw \
joachim99@75 56 --implib $(STATICLIB) \
joachim99@75 57 $(OBJ) $(LDFLAGS) $(LIBS) \
joachim99@75 58 -o $@
joachim99@75 59
joachim99@75 60 .cpp.o:
joachim99@75 61 $(CXX) $(CXXFLAGS) -c $< -o $@
joachim99@75 62
joachim99@75 63 .rc.res:
joachim99@75 64 windres.exe $< -J rc -o $@ -O coff -DMING