netsurf/cocoa/Makefile.target

104 lines
3.0 KiB
Makefile
Raw Normal View History

# ----------------------------------------------------------------------------
# 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
CFLAGS += -I/usr/include/libxml2
CFLAGS += -Icocoa/PSMTabBarControl
CFLAGS += -include cocoa/Prefix.pch
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
LDFLAGS += -Wl,-framework,Cocoa -Wl,-framework,Carbon $(NETLDFLAGS)
$(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 \
BrowserViewController.m \
BrowserWindowController.m \
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
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
S_COCOA := $(addprefix cocoa/,$(S_COCOA))
S_TABBAR := $(addprefix cocoa/PSMTabBarControl/,$(S_TABBAR))
# complete source file list
SOURCES := $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_COCOA) $(S_TABBAR)
EXETARGET := NetSurf