2011-01-19 04:36:21 +03:00
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Mac OS X target setup
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
$(eval $(call feature_enabled,PNG,-DWITH_PNG,-lpng,PNG (libpng) ))
|
|
|
|
|
|
|
|
LDFLAGS += -L/opt/local/lib
|
|
|
|
LDFLAGS += -lm -lxml2 -lcurl -liconv
|
|
|
|
LDFLAGS += -lssl -lcrypto -lhubbub -lcss -lparserutils -lwapcaplet
|
|
|
|
|
|
|
|
CFLAGS += -I. -O $(WARNFLAGS) -Dnscocoa \
|
|
|
|
-D_BSD_SOURCE -D_POSIX_C_SOURCE \
|
|
|
|
-std=c99
|
|
|
|
|
|
|
|
# DEBUG
|
|
|
|
CFLAGS += -g -O0 -Wno-uninitialized
|
|
|
|
# -DDEBUG=1
|
|
|
|
|
|
|
|
# shut up zconf.h and zlib.h
|
|
|
|
#CFLAGS += -D_LARGEFILE64_SOURCE=1
|
|
|
|
|
|
|
|
# for timerisset()
|
|
|
|
CFLAGS += -D_DARWIN_C_SOURCE
|
|
|
|
|
|
|
|
CFLAGS += -I/opt/local/include
|
2011-01-19 23:19:43 +03:00
|
|
|
CFLAGS += -I/usr/include/libxml2
|
|
|
|
CFLAGS += -Icocoa/PSMTabBarControl
|
|
|
|
CFLAGS += -include cocoa/Prefix.pch
|
2011-01-19 04:36:21 +03:00
|
|
|
|
|
|
|
VERSION_FULL := $(shell sed -n '/"/{s/.*"\(.*\)".*/\1/;p;}' desktop/version.c)
|
|
|
|
VERSION_MAJ := $(shell sed -n '/_major/{s/.* = \([0-9]*\).*/\1/;p;}' desktop/version.c)
|
|
|
|
VERSION_MIN := $(shell sed -n '/_minor/{s/.* = \([0-9]*\).*/\1/;p;}' desktop/version.c)
|
|
|
|
ifeq ($(HOST),macosx)
|
|
|
|
CFLAGS +=
|
|
|
|
else
|
|
|
|
endif
|
2011-01-19 23:19:43 +03:00
|
|
|
LDFLAGS += -Wl,-framework,Cocoa -Wl,-framework,Carbon $(NETLDFLAGS)
|
2011-01-19 04:36:21 +03:00
|
|
|
|
|
|
|
$(eval $(call feature_enabled,NSSVG,-DWITH_NS_SVG,-lsvgtiny,SVG (libsvgtiny)))
|
|
|
|
ifeq ($(HOST),macosx)
|
|
|
|
CFLAGS += -I$(PREFIX)/include
|
|
|
|
LDFLAGS += -L$(PREFIX)/lib
|
|
|
|
$(eval $(call feature_enabled,BMP,-DWITH_BMP,-lnsbmp,BMP (libnsbmp)))
|
|
|
|
$(eval $(call feature_enabled,GIF,-DWITH_GIF,-lnsgif,GIF (libnsgif)))
|
|
|
|
$(eval $(call feature_enabled,PNG,-DWITH_PNG,-lpng,PNG (libpng) ))
|
|
|
|
else
|
|
|
|
NETSURF_FEATURE_BMP_CFLAGS := -DWITH_BMP
|
|
|
|
NETSURF_FEATURE_GIF_CFLAGS := -DWITH_GIF
|
|
|
|
NETSURF_FEATURE_PNG_CFLAGS := -DWITH_PNG
|
|
|
|
$(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP))
|
|
|
|
$(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF))
|
|
|
|
$(eval $(call pkg_config_find_and_add,PNG,libpng,PNG ))
|
|
|
|
endif
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Source file setup
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# S_COCOA are sources purely for the Mac OS X build
|
|
|
|
S_COCOA := \
|
|
|
|
BrowserView.m \
|
2011-01-19 23:19:43 +03:00
|
|
|
BrowserViewController.m \
|
|
|
|
BrowserWindowController.m \
|
2011-01-19 04:36:21 +03:00
|
|
|
DownloadWindowController.m \
|
|
|
|
NetSurfAppDelegate.m \
|
|
|
|
NetsurfApp.m \
|
|
|
|
ScrollableView.m \
|
|
|
|
TreeView.m \
|
|
|
|
bitmap.m \
|
|
|
|
fetch.m \
|
|
|
|
font.m \
|
|
|
|
gui.m \
|
|
|
|
plotter.m \
|
|
|
|
save.m \
|
|
|
|
schedule.m \
|
|
|
|
selection.m \
|
|
|
|
thumbnail.m \
|
|
|
|
url.m \
|
|
|
|
utf8.m \
|
|
|
|
utils.m
|
|
|
|
|
2011-01-19 23:19:43 +03:00
|
|
|
S_TABBAR := \
|
|
|
|
NSBezierPath_AMShading.m \
|
|
|
|
NSString_AITruncation.m \
|
|
|
|
PSMOverflowPopUpButton.m \
|
|
|
|
PSMProgressIndicator.m \
|
|
|
|
PSMRolloverButton.m \
|
|
|
|
PSMTabBarCell.m \
|
|
|
|
PSMTabBarControl.m \
|
|
|
|
PSMTabBarController.m \
|
|
|
|
PSMTabDragAssistant.m \
|
|
|
|
PSMTabDragView.m \
|
|
|
|
PSMTabDragWindow.m \
|
|
|
|
PSMTabDragWindowController.m \
|
|
|
|
PSMUnifiedTabStyle.m
|
|
|
|
|
2011-01-19 04:36:21 +03:00
|
|
|
S_COCOA := $(addprefix cocoa/,$(S_COCOA))
|
2011-01-19 23:19:43 +03:00
|
|
|
S_TABBAR := $(addprefix cocoa/PSMTabBarControl/,$(S_TABBAR))
|
2011-01-19 04:36:21 +03:00
|
|
|
|
|
|
|
# complete source file list
|
2011-01-19 23:19:43 +03:00
|
|
|
SOURCES := $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_COCOA) $(S_TABBAR)
|
2011-01-19 04:36:21 +03:00
|
|
|
EXETARGET := NetSurf
|