4d1132fe8af3037e9bc3f4ff419151cebcc10fc1 markd Sun Jan 19 11:28:49 2025 -0800 userApps working as before on hgwdev diff --git src/inc/common.mk src/inc/common.mk index 58892a92fea..bb24d5e1bcd 100644 --- src/inc/common.mk +++ src/inc/common.mk @@ -1,42 +1,51 @@ # if CC is undefined, set it to gcc CC?=gcc # allow the somewhat more modern C syntax, e.g. 'for (int i=5; i<10, i++)' CFLAGS += -std=c99 +# This is required to get the cgiLoader.mk compile target to work. for some +# reason, make's %.o: %.c overrides the rule below, cause the compiles to fail +# due to lack of -I flags in rule. Running with make -r to not use built-in +# rules fixes, however MAKEFLAGS += -r doesn't do the trick, this does. +# make is a very mysterious fellow traveler. +GNUMAKEFLAGS += -r + # add additional library paths L += ${LDFLAGS} # to build on sundance: CC=gcc -mcpu=v9 -m64 ifeq (${COPT},) COPT=-O -g endif ifeq (${MACHTYPE},) MACHTYPE:=$(shell uname -m) # $(info MACHTYPE was empty, set to: ${MACHTYPE}) endif ifneq (,$(findstring -,$(MACHTYPE))) # $(info MACHTYPE has - sign ${MACHTYPE}) MACHTYPE:=$(shell uname -m) # $(info MACHTYPE has - sign set to: ${MACHTYPE}) endif HG_DEFS=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -DMACHTYPE_${MACHTYPE} HG_INC+=-I../inc -I../../inc -I../../../inc -I../../../../inc -I../../../../../inc -I$(kentSrc)/htslib # to check for Mac OSX Darwin specifics: UNAME_S := $(shell uname -s) +# to check for differences in Linux OS version +KERNEL_REL := $(shell uname -r) # to check for builds on hgwdev HOSTNAME = $(shell uname -n) # Semi-static builds, normally done in Docker # # set SEMI_STATIC=yes to enable # # These use static libraries except for -ldl, -lm, and -lc # which must be dynamic. # ifeq (${SEMI_STATIC},yes) # switch to static libraries STATIC_PRE = -Wl,-Bstatic endif L = ${STATIC_PRE} @@ -157,30 +166,34 @@ ifneq (${FREETYPECFLAGS},) FREETYPECFLAGS += -DUSE_FREETYPE endif HG_INC += ${FREETYPECFLAGS} L += ${FREETYPELIBS} endif ifeq (${PTHREADLIB},) PTHREADLIB=-lpthread endif ifneq ($(UNAME_S),Darwin) L+=${PTHREADLIB} + ifneq ($(filter 3.%, ${KERNEL_REL}),) + # older linux needed libconv + XXXICONVLIB=-liconv + endif else ifeq (${ICONVLIB},) ICONVLIB=-liconv endif endif # autodetect UCSC installation of hal: ifeq (${HALDIR},) # ONLY on hgwdev, not any other machine here (i.e. hgcompute-01) ifeq (${IS_HGWDEV},yes) HALDIR = /hive/groups/browser/hal/build/hal.2024-12-12 #HALDIR = /hive/groups/browser/hal/build/rocky9/hal.2024-12-18 ifneq ($(wildcard ${HALDIR}),) ifeq (${USE_HAL},) USE_HAL=1 @@ -464,31 +477,30 @@ ifeq (${DOCUMENTROOT},/usr/local/apache/htdocs) DOCUMENTROOT=/www/browser-docs endif endif #ENCODE COMMON VARIABLES CONFIG_FILES = \ fields.ra \ labs.ra CV = cv.ra CVDIR=${HOME}/kent/src/hg/makeDb/trackDb/cv/alpha PIPELINE_PATH=/hive/groups/encode/dcc/pipeline CONFIG_DIR = ${PIPELINE_PATH}/${PIPELINE_DIR}/config ENCODEDCC_DIR = ${PIPELINE_PATH}/downloads/encodeDCC - CC_PROG_OPTS = ${COPT} ${CFLAGS} ${HG_DEFS} ${LOWELAB_DEFS} ${HG_WARN} ${HG_INC} ${XINC} %.o: %.c ${CC} ${CC_PROG_OPTS} -o $@ -c $< # autodetect UCSC installation of node.js: ifeq (${NODEBIN},) NODEBIN = /cluster/software/src/node-v0.10.24-linux-x64/bin ifeq ($(wildcard ${NODEBIN}),) NODEBIN= endif endif # node.js tools: jshint, jsx, jsxhint, uglifyjs, ... ifeq (${JSHINT},) JSHINT=${NODEBIN}/jshint