"Fossies" - the Fresh Open Source Software Archive

Member "yudit-3.0.7/addon/Makefile" (2 Jun 2020, 2083 Bytes) of package /linux/misc/yudit-3.0.7.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "Makefile": 3.0.5_vs_3.0.7.

    1 #
    2 # This is a simple Makefile for one level c++ addons.
    3 #
    4 # Gaspar Sinai <gaspar@yudit.org>
    5 # 2020-05-04, Tokyo
    6 #
    7 # If you see broken links here this is beta version.
    8 #
    9 include ../Makefile.conf
   10 
   11 SOURCES=$(wildcard */*.cpp)
   12 
   13 #
   14 # In case you have those addons.
   15 #
   16 SYNTAX=../../syntax-1.1
   17 TRUETYPE=../../truetype-1.9
   18 YUDIT_SEDY=../../yudit_sedy-0.7.2
   19 
   20 
   21 ifeq ($(SPLATFORM),WINDOWS)
   22 OBJS=$(subst .cpp,.obj,$(SOURCES))
   23 TARGET=addon.lib
   24 else
   25 OBJS=$(subst .cpp,.o,$(SOURCES))
   26 TARGET=libaddon.a
   27 endif
   28 
   29 .PHONY: copy
   30 
   31 SUBDIRS=$(sort $(dir $(SOURCES)))
   32 SUBDIR_CPP_FLAGS=$(patsubst %,-I$(TOPDIR)/addon/%,$(SUBDIRS))
   33 
   34 
   35 CPPFLAGS:=$(CPPFLAGS) -DNO_MAIN
   36 
   37 all: $(TARGET)
   38 
   39 addon.lib: $(OBJS)
   40 	$(AR)$@ $(OBJS)
   41 
   42 libaddon.a: $(OBJS)
   43 	$(AR) $@ $(OBJS)
   44 	$(RANLIB) $@      
   45 
   46 %.o:%.cpp
   47 	$(CXX) -c -o $@ $(SUBDIR_CPP_FLAGS) $(CPPFLAGS) $(patsubst %.o,%.cpp,$@)
   48 
   49 #Windows will create it in local, we need to move it
   50 %.obj:%.cpp
   51 	$(CXX) -c $(SUBDIR_CPP_FLAGS) $(CPPFLAGS) $(patsubst %.obj,%.cpp,$@)
   52 	mv $(@F) $(@D)
   53 
   54 depend:
   55 	$(CXX) -M $(SUBDIR_CPP_FLAGS) $(CPPFLAGS)  $(patsubst %.o,%.cpp,$(OBJS)) > .depend
   56 
   57 clean: 
   58 	rm -f $(wildcard */*.o)   $(wildcard */*.obj) $(TARGET) .depend
   59 
   60 distclean: clean
   61 	rm -rf syntax truetype yudit_sedy
   62 
   63 copy:
   64 ifneq (,$(wildcard  $(YUDIT_SEDY)/*))
   65 	cp -R $(YUDIT_SEDY) yudit_sedy
   66 	rm -rf yudit_sedy/*.obj yudit_sedy/*.o
   67 else
   68 	@echo WARNING yudit_sedy plugin skipped.
   69 endif
   70 ifneq (,$(wildcard  $(SYNTAX)/*))
   71 	cp -R $(SYNTAX) syntax
   72 	rm -rf syntax/src
   73 else
   74 	@echo WARNING syntax plugin skipped.
   75 endif
   76 ifneq (,$(wildcard  $(TRUETYPE)/*))
   77 	cp -R $(TRUETYPE) truetype
   78 	rm -rf truetype/reduced
   79 	rm -rf truetype/candidate
   80 else
   81 	@echo WARNING truetype plugin skipped.
   82 endif
   83 
   84 
   85 install:
   86 
   87 # This is called by bin/wininst on windows.
   88 wininst_fonts:
   89 ifneq (,$(wildcard  truetype/target/*))
   90 	cp -R truetype/target/* $(INSTALLDIR)/fonts 
   91 else
   92 	@echo WARNING truetype plugin skipped.
   93 endif
   94 
   95 wininst_syntax:
   96 ifneq (,$(wildcard  syntax/target/*))
   97 	cp -R syntax/target/* $(INSTALLDIR)/syntax 
   98 else
   99 	@echo WARNING syntax plugin skipped
  100 endif
  101 
  102 ifeq (.depend, $(wildcard .depend))
  103 include .depend
  104 endif