# -*- Makefile -*- for libenchant # # WDK fixes by Berke Viktor, 2010 # # This makefile targets the Microsoft Visual C++ platform and is intended to build the enchant library along with its executables and test programs. # It was written by Tolon (alex@tolon.co.uk). He thinks it was originally based on an MSVC makefile from glib, but can't quite remember. # Tolon surrenders all rights regarding this file to the enchant project (http://www.abisource.com/enchant). # Please direct any comments, bug-fixes, etc. to alex@tolon.co.uk. # # Example of my usage of this makefile with MSVC9: # NMAKE -f Makefile.msvc DLL=1 PREFIX=C:\usr-msvc9 GLIBDIR=D:\dev\lib\glib # # Example of my usage of this makefile with MSVC6: # NMAKE -f Makefile.msvc DLL=1 PREFIX=C:\usr-msvc6 GLIBDIR=D:\dev\lib\glib MANIFEST=0 # # This makefile expects glib-2.0.lib and gmodule-2.0.lib to be available in the $(PREFIX)\lib folder. ENCHANT_MAJOR_VERSION=1 ENCHANT_MINOR_VERSION=6 ENCHANT_MICRO_VERSION=0 BUILDNUMBER=0 ENCHANT_VERSION="$(ENCHANT_MAJOR_VERSION).$(ENCHANT_MINOR_VERSION).$(ENCHANT_MICRO_VERSION)" #### Start of system configuration section. #### # Flags that can be set on the nmake command line: # DLL=1 for compiling a .dll with a stub .lib (default is a static .lib) # Note that this works only with MFLAGS=-MD. # MFLAGS={-ML|-MT|-MD} for defining the compilation model # MFLAGS=-ML (the default) Single-threaded, statically linked - libc.lib # MFLAGS=-MT Multi-threaded, statically linked - libcmt.lib # MFLAGS=-MD Multi-threaded, dynamically linked - msvcrt.lib # DEBUG=1 for compiling with debugging information # PREFIX=Some\Directory Base directory for installation # IIPREFIX=Some\\Directory Same thing with doubled backslashes # GLIBDIR=Some\Directory Path to glib include directory # MANIFEST=0 Disables embedding of manifest !if !defined(DLL) DLL=0 !endif !if !defined(DEBUG) DEBUG=0 !endif !if !defined(MFLAGS) !if !$(DLL) MFLAGS= !else !if !$(DEBUG) MFLAGS=-MD !else MFLAGS=-MDd !endif !endif !endif !if !defined(PREFIX) PREFIX = c:\usr !endif !if !defined(IIPREFIX) IIPREFIX = c:\\usr !endif !if !defined(MANIFEST) MANIFEST=1 !endif # Directories used by "make": glibdir = $(GLIBDIR) rootdir = .\.. topsrcdir = $(rootdir)\src toptestdir = $(rootdir)\tests bindir=$(rootdir)\bin !if $(DEBUG) outdir=$(rootdir)\bin\debug !else outdir=$(rootdir)\bin\release !endif objdir=$(outdir)\obj pdbdir=$(outdir)\pdb libdir=$(outdir) # Directories used by "make install": prefix = $(PREFIX) exec_prefix = $(prefix) #bindir = $(exec_prefix)\bin #otherlibdir = $(exec_prefix)\lib otherlibdir = $(GLIBDIR)\..\..\lib includedir = $(prefix)\include #datadir = $(prefix)\share #localedir = $(datadir)\locale #aliaspath = #IIprefix = $(IIPREFIX) #IIexec_prefix = $(IIprefix) #IIbindir = $(IIexec_prefix)\\bin #IIlibdir = $(IIexec_prefix)\\lib #IIincludedir = $(IIprefix)\\include #IIdatadir = $(IIprefix)\\share #IIlocaledir = $(IIdatadir)\\locale #IIaliaspath = # Programs used by "make": CC = cl LINK = link MT = mt # Set to -W3 if you want to see maximum amount of warnings, including stupid # ones. Set to -W1 to avoid warnings about signed/unsigned combinations. WARN_CFLAGS = -W1 !if $(DEBUG) OPTIMFLAGS = -Od !else # Some people prefer -O2 -G6 instead of -O1, but -O2 is not reliable in MSVC5. OPTIMFLAGS = -DNDEBUG -D_NDEBUG -Ox -MP2 !endif OUTPUTFLAGS = \ -Fo"$(objdir)\\" WINFLAGS = \ -DWINDOWS \ -D_WINDOWS \ -DWIN32 \ -D_WIN32 \ -DUNICODE \ -D_UNICODE DEBUGFLAGS = -Zi EXCEPTIONFLAGS = -EHsc CPPFLAGS = -D_STL70_ -D_STATIC_CPPLIB CFLAGS = \ -FI "$(topsrcdir)\config.h" \ $(MFLAGS) \ $(WARN_CFLAGS) \ $(EXCEPTIONFLAGS) \ $(OPTIMFLAGS) \ $(CPPFLAGS) \ $(WINFLAGS) \ $(OUTPUTFLAGS) INCLUDES = \ -I$(topsrcdir) \ -I$(rootdir) \ -I$(includedir) \ -I$(glibdir) \ -I$(glibdir)\glib \ -I$(glibdir)\gmodule \ -I$(glibdir)\..\..\lib\glib-2.0\include !ifdef X64 LINKOBJ = msvcrt_win2003.obj MACHINE_FLAG = X64 CFLAGS = $(CFLAGS) /favor:AMD64 /D_WIN64 !else MACHINE_FLAG = X86 LINKOBJ = msvcrt_winxp.obj !endif LINKFLAGS = \ -INCREMENTAL:NO \ -MANIFEST \ -MANIFESTUAC:"level='asInvoker' uiAccess='false'" \ -PDB:$(pdbdir)\\ \ -MACHINE:$(MACHINE_FLAG) \ -OPT:REF \ -OPT:ICF \ -DEBUG \ $(LINKOBJ) AR = lib AR_FLAGS = /out: LN = copy RM = -del # Programs used by "make install": INSTALL = copy INSTALL_PROGRAM = copy INSTALL_DATA = copy #### End of system configuration section. #### SHELL = /bin/sh CC_OBJ = $(CC) $(INCLUDES) $(CFLAGS) -c CC_LINK = $(LINK) $(LINKFLAGS) LINK_EXE = $(CC_LINK) /SUBSYSTEM:CONSOLE LINK_DLL = $(CC_LINK) /DLL /SUBSYSTEM:WINDOWS !if $(MANIFEST) EMBED_MANIFEST = $(MT) /manifest $(outdir)\exe_name.manifest /outputresource:"$(outdir)\exe_name;1" CLEAN_MANIFEST = $(RM) $(outdir)\exe_name.manifest !else EMBED_MANIFEST = CLEAN_MANIFEST = !endif # test-enchantxx isn't part of all as it has problems on MSVC6. all: makedirs libenchant libenchant_ispell libenchant_myspell enchant enchant_lsmod test-enchant #all: makedirs libenchant libenchant_ispell enchant enchant_lsmod test-enchant makedirs: force -mkdir $(bindir) -mkdir $(outdir) -mkdir $(libdir) -mkdir $(objdir) -mkdir $(pdbdir) ################################################################################ #### ENCHANT #### srcdir = $(toptestdir) ENCHANT_EXE=$(outdir)\enchant.exe ENCHANT_PDB=$(pdbdir)\enchant.pdb ENCHANT_DEFINES = \ -D_CONSOLE \ -DVERSION=\"$(ENCHANT_VERSION)\" ENCHANT_LIBS = \ $(otherlibdir)\glib-2.0.lib \ $(libdir)\libenchant.lib ENCHANT_OBJECTS = \ $(objdir)\enchant-ispell.obj $(objdir)\enchant-ispell.obj : $(srcdir)\enchant-ispell.c $(CC_OBJ) $** $(ENCHANT_DEFINES) enchant: $(ENCHANT_EXE) $(ENCHANT_EXE): $(ENCHANT_OBJECTS) $(LINK_EXE) $(ENCHANT_OBJECTS) $(ENCHANT_LIBS) -OUT:$(ENCHANT_EXE) $(EMBED_MANIFEST:exe_name=enchant.exe) $(CLEAN_MANIFEST:exe_name=enchant.exe) enchant_clean: $(RM) $(ENCHANT_OBJECTS) $(ENCHANT_EXE) $(ENCHANT_PDB) ####
libdir = $(hexchatlibdir)
lib_LTLIBRARIES = sysinfo.la
sysinfo_la_SOURCES = hwmon.c match.c parse.c pci.c xsys.c
sysinfo_la_LDFLAGS = -avoid-version -module
sysinfo_la_LIBADD = -lpci
AM_CPPFLAGS = $(COMMON_CFLAGS) -I$(srcdir)/../../src/common