⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 generic.mk

📁 The library provides supports for run-time loaded plugin classes in C++
💻 MK
字号:
# Generic stuff for GNU cross platform makefile# Current OS # Windows or Linux supported now, but can be modifiedPLATFORM= $(if $(findstring Windows,$(OS)),win32,linux)CWD= $(shell pwd)# Basic settings to all projects in shared environment ifeq ($(PLATFORM),win32)  detest= if exist $(1)\nul echo 1  fetest= if exist $(1) echo 1  # Projects location  PROJ:= G:/proj  CPP:= mingw32-g++  RC:= windres.exe  AR:= ar.exe  EXESUFF:=.exe  SOSUFF:=.dll  LIBSUFF:=.a   LIBPREF:=.a   # -Wno-attributes  gcc 4.1 - suppress warnings  CPPFLAGS:= -mthreads -pipe   DEFS:= -D__GNUWIN32__   # Fix for g++ bug on win32, make g++ see system include dirs before app dirs  #INCZ:= -IC:\mingw\include\c++\4.2.0  INCZ+= -I$(WXWIN)/lib/gcc_dll/mswud   LIBP:=   LIBZ:=   LIBDL:= $(WXWIN)/lib/gcc_dll/wxbase28ud_gcc_arst.dll   # --enable-extra-pe-debug -mwindows  LINKFLAGS:=  else  detest= if [ -d $(1) ]; then echo 1; else echo 0; fi  fetest= if [ -e $(1) ]; then echo 1; else echo 0; fi  # Projects location  PROJ:= /proj  SOSUFF:=.so  LIBSUFF:=.a  SOPREF:=lib  LIBPREF:=lib  CPP:= g++  AR:= ar  CPPFLAGS:=   DEFS:=  INCZ=   LIBZ:=   LIBDL:= -ldl   LINKFLAGS:= -pthreadendif# make function to test for file/dirDirExists= $(shell $(call detest,$(1)))FileExists= $(shell $(call fetest,$(1)))# Add shared settingsCPPFLAGS += -Wreturn-type           # Really useful!INCZ += -I$(CWD) -I$(PROJ)/home # The binary output directoryBINDIR= bin_$(PLATFORM)ifneq ($(call DirExists,$(BINDIR)),1)  $(shell mkdir $(BINDIR))endif# Initialize to nothingOBJS := LOG := # This will add the MAIN target if not given already (and only one goal)#ifeq ($(words $(MAKECMDGOALS)),1)#  ifeq ($(findstring MAIN,$(MAKECMDGOALS)),)#    MAKECMDGOALS += MAIN#  endif#endif# $(warning goals: $(MAKECMDGOALS))# Tests of above#$(warning $(call DirExists,bu))#$(warning $(call DirExists,bu12))#$(warning DO: $(call FileExists,DynObj.cpp))#$(warning DO1: $(call FileExists,DynObj1.cpp))#$(warning $(if $(call DirExists,bu),it exists,nope no fir))

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -