## Makefile for building the glib dlls with Microsoft C ## Use: nmake -f makefile.msc ## ## Adapted for the ROOT project ## ################################################################ # # Figure out if we are going to debug qualifiers or not # !IFNDEF DEBUG # Full optimization: OPTIMIZE = -O2 -MD !ELSE # Debugging: OPTIMIZE = -Z7 -MDd LINKDEBUG = /debug !ENDIF # # Override all options if something is passed in from outside (i.e. the ROOT build system) # # cl -? describes the options #CC = cl -G5 -GF $(OPTIMIZE) -W3 -nologo !if "$(NMCXXFLAGS)" == "" CC = cl -GR $(OPTIMIZE) -W3 -nologo !else CC = cl -nologo $(NMCXXFLAGS) !endif LDFLAGS = /link $(LINKDEBUG) GLIB_VER=1.3 # Check if nmake version is 8.xx or 9.xx !if ([nmake /? 2>&1 | findstr /c:"Version 8\." > nul ] == 0) || \ ([nmake /? 2>&1 | findstr /c:"Version 9\." > nul ] == 0) MT_DLL = mt -nologo -manifest $@.manifest -outputresource:$@;2 CLEAN_MT = -@erase /q $@.manifest >nul 2>&1 !else MT_DLL = CLEAN_MT = !endif CFLAGS = -I. -I.. -I..\iconv -I..\.. -DG_LOG_DOMAIN=g_log_domain_glib -DG_ENABLE_DEBUG -DGLIB_COMPILATION -DHAVE_CONFIG_H -DUSE_LIBICONV # You could add this if you wanted... -DG_ENABLE_DEBUG ###################### all : \ config.h \ glibconfig.h \ glib-$(GLIB_VER).dll \ glib_OBJECTS = \ garray.obj \ gasyncqueue.obj \ gbacktrace.obj \ gcache.obj \ gcompletion.obj \ gconvert.obj \ gdataset.obj \ gdate.obj \ gerror.obj \ gfileutils.obj \ ghash.obj \ ghook.obj \ giochannel.obj \ giowin32.obj \ glist.obj \ gmain.obj \ gmarkup.obj \ gmem.obj \ gmessages.obj \ gnode.obj \ gprimes.obj \ gqsort.obj \ gqueue.obj \ gpattern.obj \ grand.obj \ grel.obj \ gscanner.obj \ gshell.obj \ gslist.obj \ gspawn-win32.obj \ gstrfuncs.obj \ gstring.obj \ gbsearcharray.obj \ gthread.obj \ gthreadpool.obj \ gtimer.obj \ gtree.obj \ gunibreak.obj \ gunicollate.obj \ gunidecomp.obj \ guniprop.obj \ gutf8.obj \ gutils.obj \ gwin32.obj glibconfig.h: glibconfig.h.win32 copy glibconfig.h.win32 glibconfig.h config.h: config.h.win32 copy config.h.win32 config.h ################ glib glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def cd $(CC) $(CFLAGS) -LD -Feglib-$(GLIB_VER).dll $(glib_OBJECTS) $(LIBICONV_LIBS) $(INTL_LIBS) user32.lib advapi32.lib wsock32.lib $(LDFLAGS) ..\iconv\iconv-1.3.lib /def:glib.def $(MT_DLL) $(CLEAN_MT) .c.obj : $(CC) $(CFLAGS) -c -DGDK_COMPILATION -DG_LOG_DOMAIN=\"Gdk\" $< ################ other stuff clean:: del config.h del glibconfig.h -@erase /q *.dll >nul 2>&1 -@erase /q *.obj >nul 2>&1 -@erase /q *.lib >nul 2>&1 -@erase /q *.err >nul 2>&1 -@erase /q *.res >nul 2>&1 -@erase /q *.exp >nul 2>&1 -@erase /q *.pdb >nul 2>&1 -@erase /q *.ilk >nul 2>&1