Commit 8da557f0 authored by Claes Sjofors's avatar Claes Sjofors

Mac OS X build files and compilation modifications 2

parent 58682c65
include $(pwre_dir_symbols)
ifndef variables_mk
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/variables.mk
endif
ifndef variables_mk
include $(pwre_kroot)/tools/bld/src/$(os_name)/variables.mk
endif
ifndef rules_mk
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/rules.mk
endif
ifndef rules_mk
include $(pwre_kroot)/tools/bld/src/$(os_name)/rules.mk
endif
vpath %.pdf $(hw_source):$(os_source):$(co_source)
source_dirs := $(hw_source) $(os_source) $(co_source)
p_en_us_sources := $(sort \
$(foreach file, \
$(foreach dir, \
$(pwre_sroot)/doc/dsh/en_us, \
$(wildcard $(dir)/*.pdf) \
), $(notdir $(file)) \
) \
)
h_en_us_sources := $(sort \
$(foreach file, \
$(foreach dir, \
$(pwre_sroot)/doc/dsh/en_us, \
$(wildcard $(dir)/*.html) \
), $(notdir $(file)) \
) \
)
p_sv_se_sources := $(sort \
$(foreach file, \
$(foreach dir, \
$(pwre_sroot)/doc/dsh/sv_se, \
$(wildcard $(dir)/*.pdf) \
), $(notdir $(file)) \
) \
)
h_sv_se_sources := $(sort \
$(foreach file, \
$(foreach dir, \
$(pwre_sroot)/doc/dsh/sv_se, \
$(wildcard $(dir)/*.html) \
), $(notdir $(file)) \
) \
)
pdf_en_us_sources := $(filter %.pdf,$(p_en_us_sources))
html_en_us_sources := $(filter %.html,$(h_en_us_sources))
pdf_sv_se_sources := $(filter %.pdf,$(p_sv_se_sources))
html_sv_se_sources := $(filter %.html,$(h_sv_se_sources))
export_pdf_en_us := $(patsubst %.pdf,$(doc_dir)/en_us/dsh/%.pdf,$(pdf_en_us_sources))
export_html_en_us := $(patsubst %.html,$(doc_dir)/en_us/dsh/%.html,$(html_en_us_sources))
export_pdf_sv_se := $(patsubst %.pdf,$(doc_dir)/sv_se/dsh/%.pdf,$(pdf_sv_se_sources))
export_html_sv_se := $(patsubst %.html,$(doc_dir)/sv_se/dsh/%.html,$(html_sv_se_sources))
clean_pdf := $(patsubst %.pdf,clean_%.pdf,$(pdf_sources))
clean_html := $(patsubst %.html,clean_%.html,$(html_sources))
.SUFFIXES:
$(doc_dir)/en_us/dsh/%.pdf : $(pwre_sroot)/doc/dsh/en_us/%.pdf
@ $(log_h_h)
@ $(cp) $(cpflags) $(source) $(target)
$(doc_dir)/en_us/dsh/%.html : $(pwre_sroot)/doc/dsh/en_us/%.html
@ $(log_h_h)
@ $(cp) $(cpflags) $(source) $(target)
$(doc_dir)/sv_se/dsh/%.pdf : $(pwre_sroot)/doc/dsh/sv_se/%.pdf
@ $(log_h_h)
@ $(cp) $(cpflags) $(source) $(target)
$(doc_dir)/sv_se/dsh/%.html : $(pwre_sroot)/doc/dsh/sv_se/%.html
@ $(log_h_h)
@ $(cp) $(cpflags) $(source) $(target)
.PHONY : all init copy lib exe clean realclean \
$(clean_pdf)
all : init copy lib exe
init :
copy : $(export_pdf_en_us) $(export_html_en_us) \
$(export_pdf_sv_se) $(export_html_sv_se)
lib :
exe :
clean :
realclean : clean $(clean_pdf) $(clean_html)
$(clean_pdf) : clean_%.pdf : %.pdf
@ $(rm) $(rmflags) $(doc_dir)/$*.pdf
$(clean_html) : clean_%.html : %.html
@ $(rm) $(rmflags) $(doc_dir)/$*.html
include $(pwre_dir_symbols)
ifndef variables_mk
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/variables.mk
endif
ifndef variables_mk
include $(pwre_kroot)/tools/bld/src/$(os_name)/variables.mk
endif
ifndef rules_mk
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/rules.mk
endif
ifndef rules_mk
include $(pwre_kroot)/tools/bld/src/$(os_name)/rules.mk
endif
vpath %.gif $(hw_source):$(os_source):$(co_source)
source_dirs := $(hw_source) $(os_source) $(co_source)
gif_sources := $(sort \
$(foreach file, \
$(foreach dir, \
$(source_dirs), \
$(wildcard $(dir)/*.gif) \
), $(notdir $(file)) \
) \
)
html_sources := $(sort \
$(foreach file, \
$(foreach dir, \
$(source_dirs), \
$(wildcard $(dir)/*.html) \
), $(notdir $(file)) \
) \
)
export_gif := $(patsubst %.gif,$(doc_dir)/en_us/orm/%.gif,$(gif_sources))
export_html := $(patsubst %.html,$(doc_dir)/en_us/orm/%.html,$(html_sources))
clean_gif := $(patsubst %.gif,clean_%.gif,$(gif_sources))
clean_html := $(patsubst %.html,clean_%.html,$(html_sources))
.SUFFIXES:
$(doc_dir)/en_us/orm/%.gif : %.gif
@ $(log_h_h)
@ $(cp) $(cpflags) $(source) $(target)
@ $(cp) $(cpflags) $(source) $(doc_dir)/sv_se/orm
@ $(cp) $(cpflags) $(source) $(doc_dir)/help
$(doc_dir)/en_us/orm/%.html : ../../%.html
@ $(log_h_h)
@ $(cp) $(cpflags) $(source) $(target)
@ $(cp) $(cpflags) $(source) $(doc_dir)/sv_se/orm
@ $(cp) $(cpflags) $(source) $(doc_dir)/help
.PHONY : all init copy lib exe clean realclean \
$(clean_gif)
all : init copy lib exe
init :
copy : $(export_gif) $(export_html)
lib :
exe :
clean :
realclean : clean $(clean_gif) $(clean_html) $(clean_c)
$(clean_gif) : clean_%.gif : %.gif
@ $(rm) $(rmflags) $(doc_dir)/orm/$*.gif
$(clean_html) : clean_%.html : %.html
@ $(rm) $(rmflags) $(doc_dir)/orm/$*.html
include $(pwre_dir_symbols)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq ($($(type_name)_generic_mk),)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq ($($(type_name)_generic_mk),)
include $(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include ../../special.mk
-include ../special.mk
-include special.mk
include $(pwre_dir_symbols)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq ($($(type_name)_generic_mk),)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq ($($(type_name)_generic_mk),)
include $(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include ../../special.mk
-include ../special.mk
-include special.mk
include $(pwre_dir_symbols)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq ($($(type_name)_generic_mk),)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq ($($(type_name)_generic_mk),)
include $(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include ../../special.mk
-include ../special.mk
-include special.mk
include $(pwre_dir_symbols)
ifndef variables_mk
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/variables.mk
endif
ifndef variables_mk
include $(pwre_kroot)/tools/bld/src/$(os_name)/variables.mk
endif
ifndef rules_mk
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/rules.mk
endif
ifndef rules_mk
include $(pwre_kroot)/tools/bld/src/$(os_name)/rules.mk
endif
vpath %.pdf $(hw_source):$(os_source):$(co_source)
source_dirs := $(hw_source) $(os_source) $(co_source)
p_en_us_sources := $(sort \
$(foreach file, \
$(foreach dir, \
$(pwre_sroot)/doc/dsh/en_us, \
$(wildcard $(dir)/*.pdf) \
), $(notdir $(file)) \
) \
)
h_en_us_sources := $(sort \
$(foreach file, \
$(foreach dir, \
$(pwre_sroot)/doc/dsh/en_us, \
$(wildcard $(dir)/*.html) \
), $(notdir $(file)) \
) \
)
p_sv_se_sources := $(sort \
$(foreach file, \
$(foreach dir, \
$(pwre_sroot)/doc/dsh/sv_se, \
$(wildcard $(dir)/*.pdf) \
), $(notdir $(file)) \
) \
)
h_sv_se_sources := $(sort \
$(foreach file, \
$(foreach dir, \
$(pwre_sroot)/doc/dsh/sv_se, \
$(wildcard $(dir)/*.html) \
), $(notdir $(file)) \
) \
)
pdf_en_us_sources := $(filter %.pdf,$(p_en_us_sources))
html_en_us_sources := $(filter %.html,$(h_en_us_sources))
pdf_sv_se_sources := $(filter %.pdf,$(p_sv_se_sources))
html_sv_se_sources := $(filter %.html,$(h_sv_se_sources))
export_pdf_en_us := $(patsubst %.pdf,$(doc_dir)/en_us/dsh/%.pdf,$(pdf_en_us_sources))
export_html_en_us := $(patsubst %.html,$(doc_dir)/en_us/dsh/%.html,$(html_en_us_sources))
export_pdf_sv_se := $(patsubst %.pdf,$(doc_dir)/sv_se/dsh/%.pdf,$(pdf_sv_se_sources))
export_html_sv_se := $(patsubst %.html,$(doc_dir)/sv_se/dsh/%.html,$(html_sv_se_sources))
clean_pdf := $(patsubst %.pdf,clean_%.pdf,$(pdf_sources))
clean_html := $(patsubst %.html,clean_%.html,$(html_sources))
.SUFFIXES:
$(doc_dir)/en_us/dsh/%.pdf : $(pwre_sroot)/doc/dsh/en_us/%.pdf
@ $(log_h_h)
@ $(cp) $(cpflags) $(source) $(target)
$(doc_dir)/en_us/dsh/%.html : $(pwre_sroot)/doc/dsh/en_us/%.html
@ $(log_h_h)
@ $(cp) $(cpflags) $(source) $(target)
$(doc_dir)/sv_se/dsh/%.pdf : $(pwre_sroot)/doc/dsh/sv_se/%.pdf
@ $(log_h_h)
@ $(cp) $(cpflags) $(source) $(target)
$(doc_dir)/sv_se/dsh/%.html : $(pwre_sroot)/doc/dsh/sv_se/%.html
@ $(log_h_h)
@ $(cp) $(cpflags) $(source) $(target)
.PHONY : all init copy lib exe clean realclean \
$(clean_pdf)
all : init copy lib exe
init :
copy : $(export_pdf_en_us) $(export_html_en_us) \
$(export_pdf_sv_se) $(export_html_sv_se)
lib :
exe :
clean :
realclean : clean $(clean_pdf) $(clean_html)
$(clean_pdf) : clean_%.pdf : %.pdf
@ $(rm) $(rmflags) $(doc_dir)/$*.pdf
$(clean_html) : clean_%.html : %.html
@ $(rm) $(rmflags) $(doc_dir)/$*.html
include $(pwre_dir_symbols)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq ($($(type_name)_generic_mk),)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq ($($(type_name)_generic_mk),)
include $(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include ../../special.mk
-include ../special.mk
-include special.mk
include $(pwre_dir_symbols)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq ($($(type_name)_generic_mk),)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq ($($(type_name)_generic_mk),)
include $(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include ../../special.mk
-include ../special.mk
-include special.mk
......@@ -5,6 +5,7 @@ link = g++ -dynamiclib -DHW_X86_64 -DOS_MACOS \
-L${pwr_elib} \
-L${pwr_lib} \
-L${db}/lib \
-L/sw/lib \
${pwre_broot}/${pwre_target}/bld/lib/co/*.o \
$(rt_msg_eobjs) \
${pwre_broot}/${pwre_target}/bld/lib/msg_dummy/msg_dummy_qcom.o \
......
include $(pwre_dir_symbols)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq ($($(type_name)_generic_mk),)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq ($($(type_name)_generic_mk),)
include $(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include ../../special.mk
-include ../special.mk
-include special.mk
ifndef link_rule_mk
link_rule_mk := 1
link = $(ldxx) $(elinkflags) $(domap) -o $(export_exe) \
$(export_obj) -lpwr_opc -lpwr_rt -lpwr_co -lpwr_msg_dummy -liconv
endif
......@@ -19,6 +19,7 @@
*/
#include <map>
#include <sys/socket.h>
#include <net/if.h>
#include <net/if_arp.h>
#include <pthread.h>
......
include $(pwre_dir_symbols)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq ($($(type_name)_generic_mk),)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq ($($(type_name)_generic_mk),)
include $(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include ../../special.mk
-include ../special.mk
-include special.mk
ifndef link_rule_mk
link_rule_mk := 1
link = $(ldxx) $(elinkflags) $(domap) -o $(export_exe) \
$(export_obj) -lpwr_opc -lpwr_rt -lpwr_co -lpwr_msg_dummy -liconv
endif
include $(pwre_dir_symbols)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq ($($(type_name)_generic_mk),)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq ($($(type_name)_generic_mk),)
include $(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include ../../special.mk
-include ../special.mk
-include special.mk
ifndef variables_mk
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/variables.mk
endif
ifndef variables_mk
include $(pwre_kroot)/tools/bld/src/$(os_name)/variables.mk
endif
export_cpp = $(bld_dir)/stdsoap2.o
export_h = $(inc_dir)/stdsoap2.h $(inc_dir)/Service.nsmap
lib : $(export_lib) export_lib_local
export_lib_local : $(export_cpp) $(export_h)
@ $(ar) -r $(export_lib) $(export_cpp)
$(bld_dir)/stdsoap2.o : ../../stdsoap2.cpp
$(inc_dir)/stdsoap2.h : ../../stdsoap2.h
$(inc_dir)/Service.nsmap : ../../Service.nsmap
@ echo "Export $(source)"
@ $(cp) $(cpflags) $(source) $(target)
include $(pwre_dir_symbols)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq ($($(type_name)_generic_mk),)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq ($($(type_name)_generic_mk),)
include $(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include ../../special.mk
-include ../special.mk
-include special.mk
ifndef variables_mk
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/variables.mk
endif
ifndef variables_mk
include $(pwre_kroot)/tools/bld/src/$(os_name)/variables.mk
endif
export_cpp = $(bld_dir)/stdsoap2.o
export_h = $(inc_dir)/stdsoap2.h $(inc_dir)/Service.nsmap
lib : $(export_lib) export_lib_local
export_lib_local : $(export_cpp) $(export_h)
@ $(ar) -r $(export_lib) $(export_cpp)
$(bld_dir)/stdsoap2.o : ../../stdsoap2.cpp
$(inc_dir)/stdsoap2.h : ../../stdsoap2.h
$(inc_dir)/Service.nsmap : ../../Service.nsmap
@ echo "Export $(source)"
@ $(cp) $(cpflags) $(source) $(target)
include $(pwre_dir_symbols)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq ($($(type_name)_generic_mk),)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq ($($(type_name)_generic_mk),)
include $(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include ../../special.mk
-include ../special.mk
-include special.mk
include $(pwre_dir_symbols)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq ($($(type_name)_generic_mk),)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq ($($(type_name)_generic_mk),)
include $(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include ../../special.mk
-include ../special.mk
-include special.mk
......@@ -304,7 +304,7 @@ ini_sProc *ini_ProcInsert (
if (file != NULL && file[0] != '\0' && strcmp(file, "\"\"")) {
if (pp->proc.file != NULL) free(pp->proc.file);
pp->proc.file = strsav(file);
#if defined(OS_LINUX)
#if defined(OS_LINUX) || defined OS_MACOS
s = getenv("pwr_exe");
sprintf(buf, "%s/%s", s, file);
ret = stat(buf, &f_stat);
......@@ -373,7 +373,7 @@ void ini_ProcPrio (
return;
if (pp->flags.b.run) {
#if defined(OS_LINUX)
#if defined(OS_LINUX) || defined OS_MACOS
if (!(pp->flags.b.plc)) {
sprintf(set, "rt_prio -rp %d %d", pp->proc.p_prio, pp->proc.pid);
system(set);
......@@ -512,7 +512,7 @@ ini_ProcWait (
pwr_dStatus(sts, status, INI__SUCCESS);
#if defined OS_LYNX || defined OS_LINUX
#if defined OS_LYNX || defined OS_LINUX || defined OS_MACOS
for (;;) {
int status;
......
......@@ -474,7 +474,7 @@ pwrc_create_func()
local proot
local bname
local pname
local platforms="x86_linux x86_64_linux"
local platforms="x86_linux x86_64_linux x86_64_macos"
let argc=$#
cmd="project"
......@@ -1542,13 +1542,20 @@ pwrp_env ()
pwrc_parse ()
{
unamestr=`eval uname`
machine=`eval uname -m`
if [ $machine != "x86_64" ]; then
machine="x86"
if [ $unamestr == "Darwin" ]; then
os="os_macos"
hw="hw_x86_64"
platform="x86_64_macos"
else
if [ $machine != "x86_64" ]; then
machine="x86"
fi
platform=$machine"_linux"
os="os_linux"
hw="hw_"$machine
fi
platform=$machine"_linux"
os="os_linux"
hw="hw_"$machine
local cmd
......
......@@ -39,15 +39,15 @@
echo "User $user"
eval `ipcs -s|grep ^0x|grep "[ \t]$user[ \t]"|awk '{printf "ipcrm sem %s;", $2
eval `ipcs -s|grep ^s|grep "[ \t]$user[ \t]"|awk '{printf "ipcrm -s %s;", $2
}'`
# remove message queues
eval `ipcs -q|grep ^0x|grep "[ \t]$user[ \t]"|awk '{printf "ipcrm msg %s;", $2
eval `ipcs -q|grep ^q|grep "[ \t]$user[ \t]"|awk '{printf "ipcrm -q %s;", $2
}'`
# remove shared memory
eval `ipcs -m|grep ^0x|grep "[ \t]$user[ \t]"|awk '{printf "ipcrm shm %s;", $2
eval `ipcs -m|grep ^m|grep "[ \t]$user[ \t]"|awk '{printf "ipcrm -m %s;", $2
}'`
if [ -e $pwrp_exe/pwrp_stop.sh ]; then
......
......@@ -474,7 +474,7 @@ pwrc_create_func()
local proot
local bname
local pname
local platforms="x86_linux x86_64_linux"
local platforms="x86_linux x86_64_linux x86_64_macos"
let argc=$#
cmd="project"
......@@ -613,6 +613,13 @@ Edit file \$pwrp_cnf/xtt_help.dat to write this description.
<include> \$pwr_lang/nmps_xtthelp.dat
<include> \$pwr_lang/ssabox_xtthelp.dat
EOF
# Create an empty directory database
echo "Creating directory database"
cat > $proot/src/db/directory.wb_load << EOF
Volume directory \$DirectoryVolume 254.254.254.253
EndVolume
EOF
# Set ownership to user and group pwrp
......@@ -627,25 +634,7 @@ EOF
chmod -R g+w $proot/
fi
# Insert in projectlist
pwrc_prlist_read
if [ $pwrc_status -ne $pwrc__success ]; then
return
fi
pwrc_prlist_add $@
# pwrc_prlist_write
if [ $pwrc_status -ne $pwrc__success ]; then
return
fi
pwrc_set_func "project" $pname
if [ $pwrc_status -ne $pwrc__success ]; then
return
fi
# Create an empty directory database
echo "Creating directory database"
wb_cmd create volume/directory
pwrc_status=$pwrc__success
return
fi
......@@ -1553,13 +1542,20 @@ pwrp_env ()
pwrc_parse ()
{
unamestr=`eval uname`
machine=`eval uname -m`
if [ $machine != "x86_64" ]; then
machine="x86"
if [ $unamestr == "Darwin" ]; then
os="os_macos"
hw="hw_x86_64"
platform="x86_64_macos"
else
if [ $machine != "x86_64" ]; then
machine="x86"
fi
platform=$machine"_linux"
os="os_linux"
hw="hw_"$machine
fi
platform=$machine"_linux"
os="os_linux"
hw="hw_"$machine
local cmd
......
......@@ -42,7 +42,7 @@
#include "rt_qdb.h"
#include "rt_pool.h"
#include "rt_hash.h"
#include "rt_futex.h"
//#include "rt_futex.h"
#if 0
......
......@@ -378,7 +378,7 @@ newSegment (
/* Allocate the section */
segName(name, gphp->name, gphp->generation),
segName(name, gphp->name, gphp->generation);
shp = sect_Alloc(sts, &created, &psp->sect, size << pool_cOffsAlign, name);
if (shp == NULL) return NULL;
......
......@@ -111,7 +111,7 @@ endif
log_done =
csetos := -DOS_MACOS=1 -DOS=macos -D_MACOS -DHW_X86_64=1 -DHW=x86_64
cinc := -I$(inc_dir) -I$(einc_dir) -I$(hw_source) -I$(os_source) -I$(co_source) -I/usr/X11R6/include -I/System/Library/Frameworks/JavaVM.framework/Headers -I$(jdk)/include/macos \
cinc := -I$(inc_dir) -I$(einc_dir) -I$(hw_source) -I$(os_source) -I$(co_source) -I/sw/include -I/System/Library/Frameworks/JavaVM.framework/Headers -I$(jdk)/include/macos \
`pkg-config --cflags gtk+-2.0` -I$(db)/include -DPREFIX=\"/usr/local\" -DSYSCONFDIR=\"/etc\" -DDATADIR=\"/usr/share\" -DLIBDIR=\"/usr/lib\" $(cmysql) $(cgtk)
rm := rm
cp := cp
......
......@@ -116,14 +116,18 @@ EOF
pwra_parse ()
{
unamestr=`eval uname`
machine=`eval uname -m`
if [ "$machine" != "x86_64" ]; then
machine="x86"
if [ $unamestr == "Darwin" ]; then
os="os_macos"
hw="hw_x86_64"
else
if [ $machine != "x86_64" ]; then
machine="x86"
fi
os="os_linux"
hw="hw_"$machine
fi
platform=$machine"_linux"
os="os_linux"
hw="hw_"$machine
#mysql_socket="--socket /var/lib/mysql/mysql.sock"
local cmd
......
......@@ -116,14 +116,18 @@ EOF
pwra_parse ()
{
unamestr=`eval uname`
machine=`eval uname -m`
if [ "$machine" != "x86_64" ]; then
machine="x86"
if [ $unamestr == "Darwin" ]; then
os="os_macos"
hw="hw_x86_64"
else
if [ $machine != "x86_64" ]; then
machine="x86"
fi
os="os_linux"
hw="hw_"$machine
fi
platform=$machine"_linux"
os="os_linux"
hw="hw_"$machine
#mysql_socket="--socket /var/lib/mysql/mysql.sock"
local cmd
......
......@@ -101,7 +101,7 @@ SObject pwrs:Type
EndBody
EndObject
!/**
! Operating system is Linux on x86
! Operating system is Linux on x86_64
!*/
Object X86_64_LINUX $Value
Body SysBody
......@@ -110,5 +110,15 @@ SObject pwrs:Type
Attr Value = 128
EndBody
EndObject
!/**
! Operating system is Mac OS X on x86_64
!*/
Object X86_64_MACOS $Value
Body SysBody
Attr PgmName = "X86_64_MACOS"
Attr Text = "Mac OS X on x86_64"
Attr Value = 256
EndBody
EndObject
EndObject
EndSObject
......@@ -104,7 +104,7 @@ SObject pwrs:Type
EndBody
EndObject
!/**
! Operating system is Linux on x86
! Operating system is Linux on x86_64
!*/
Object X86_64_LINUX $Bit
Body SysBody
......@@ -113,5 +113,15 @@ SObject pwrs:Type
Attr Value = 128
EndBody
EndObject
!/**
! Operating system is Mac OS X on x86_64
!*/
Object X86_64_MACOS $Bit
Body SysBody
Attr PgmName = "X86_64_MACOS"
Attr Text = "Mac OS X on x86_64"
Attr Value = 256
EndBody
EndObject
EndObject
EndSObject
......@@ -21,6 +21,7 @@
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <netinet/in.h>
......
......@@ -160,7 +160,6 @@ CompileWindow()
CompileRtNode()
{
#link option file exists and is not empty
if [ -s $pwrp_exe/$FileName.opt ]; then
......@@ -177,7 +176,7 @@ CompileRtNode()
$Libs \
$ld_opt \
$pwr_obj/pwr_msg_rt.o $pwr_obj/pwr_msg_co.o \
-lrt -lpwr_remote -lpwr_nmps -lpwr_rt -lpwr_co -lrpcsvc -lpwr_msg_dummy -lpthread -lm
-lpwr_remote -lpwr_nmps -lpwr_rt -lpwr_co -lrpcsvc -lpwr_msg_dummy -lpthread -lm
then
echo "-- Plc program linked for $OsStr $say_linkdebug node $FileName"
gcg_status=$gcg__success
......@@ -254,7 +253,8 @@ let OpSys_X86_LYNX=5
let OpSys_PPC_LINUX=6
let OpSys_X86_LINUX=7
let OpSys_X86_64_LINUX=8
let OpSys__High=9
let OpSys_X86_64_MACOS=9
let OpSys__High=10
vOpSys="custombuild,vax_vms,axp_vms,ppc_lynx,x86_lynx,ppc_linux,x86_linux,x86_64_linux"
......@@ -289,11 +289,16 @@ fi
# Check OpSys
#
# Current opsys
unamestr=`eval uname`
machine=`eval uname -m`
if [ $machine = "x86_64" ]; then
CurrentOpSys=$OpSys_X86_64_LINUX
if [ $unamestr == "Darwin" ]; then
CurrentOpSys=$OpSys_X86_64_MACOS
else
CurrentOpSys=$OpSys_X86_LINUX
if [ $machine = "x86_64" ]; then
CurrentOpSys=$OpSys_X86_64_LINUX
else
CurrentOpSys=$OpSys_X86_LINUX
fi
fi
#
......@@ -352,6 +357,20 @@ elif [ $OpSys -eq $OpSys_X86_64_LINUX ]; then
echo "-- Not built for x86_64_linux"
fi
elif [ $OpSys -eq $OpSys_X86_64_MACOS ]; then
pwrp_gc="$pwrp_tmp"
# Suppress all warnings, -x
if [ $CurrentOpSys -eq $OpSys ]; then
cc_cmd="gcc -c -x c -w $cc_debug -D_REENTRANT -DOS_MACOS -I$pwr_inc -I$pwrp_inc -I$pwrp_tmp $PWR_EXT_INC"
FileTypeStr="`echo $vFileType| cut -f $FileTypeIdx -d ,`"
# Execute build command
Compile$FileTypeStr
exit $gcg_status
fi
elif [ $OpSys -eq $OpSys_AXP_VMS ]; then
rsh $pwr_build_host_axp_vms @pwr_exe:wb_gcg \"$1\" \"$2\" \"$3\" \"$4\" \"$5\" \"$6\" \"$7\" \"$pwrp_root\"
......
......@@ -101,12 +101,14 @@ extern "C" {
#define IS_LYNX(os) ((os & pwr_mOpSys_PPC_LYNX) \
|| (os & pwr_mOpSys_X86_LYNX))
#define IS_MACOS(os) (os & pwr_mOpSys_X86_64_MACOS)
#define IS_LINUX(os) ((os & pwr_mOpSys_PPC_LINUX) \
|| (os & pwr_mOpSys_X86_LINUX) \
|| (os & pwr_mOpSys_X86_64_LINUX) \
|| (os & pwr_mOpSys_CustomBuild))
#define IS_UNIX(os) (IS_LINUX(os) || IS_LYNX(os))
#define IS_UNIX(os) (IS_LINUX(os) || IS_LYNX(os) || IS_MACOS(os))
#define IS_NOT_UNIX(os) (!IS_UNIX(os))
......@@ -853,6 +855,8 @@ static pwr_tStatus gcg_get_build_host(
strcpy(logname, "pwr_build_host_x86_linux");
else if (os & pwr_mOpSys_X86_64_LINUX)
strcpy(logname, "pwr_build_host_x86_64_linux");
else if (os & pwr_mOpSys_X86_64_MACOS)
strcpy(logname, "pwr_build_host_x86_64_macos");
else if (os & pwr_mOpSys_CustomBuild)
strcpy(logname, "pwr_build_host_custom_build");
else
......@@ -4659,6 +4663,7 @@ static int gcg_get_child_plcthread(
/* Check the scantime */
timebase = (int)((*scantime_ptr) * 1000 + 0.5);
if ( (IS_LINUX(os) && *scantime_ptr < 0.0000001) ||
(IS_MACOS(os) && *scantime_ptr < 0.0000001) ||
(IS_LYNX(os) && ((timebase <= 0) || ((timebase / 10) * 10) != timebase)) ||
(IS_VMS_OR_ELN(os) && ((timebase <= 0) || ((timebase / 10) * 10) != timebase)) ) {
gcg_plc_msg( gcgctx, GSX__BADSCANTIME, objdid);
......@@ -5184,6 +5189,11 @@ int gcg_comp_rtnode(
strcpy( os_str, "X86_64_LINUX"); /* Not used */
max_no_timebase = GCG_MAX_NO_TIMEBASE_LINUX;
break;
case pwr_mOpSys_X86_64_MACOS:
strcpy( objdir, "xxx");
strcpy( os_str, "X86_64_MACOS"); /* Not used */
max_no_timebase = GCG_MAX_NO_TIMEBASE_LINUX;
break;
case pwr_mOpSys_CustomBuild:
strcpy( objdir, "xxx");
strcpy( os_str, "CustomBuild"); /* Not used */
......@@ -5412,6 +5422,7 @@ int gcg_comp_rtnode(
case pwr_mOpSys_PPC_LINUX:
case pwr_mOpSys_X86_LINUX:
case pwr_mOpSys_X86_64_LINUX:
case pwr_mOpSys_X86_64_MACOS:
case pwr_mOpSys_X86_LYNX:
case pwr_mOpSys_PPC_LYNX:
case pwr_mOpSys_CustomBuild:
......
......@@ -1282,7 +1282,8 @@ pwr_tStatus lfu_SaveDirectoryVolume(
os == pwr_mOpSys_X86_LYNX ||
os == pwr_mOpSys_PPC_LINUX ||
os == pwr_mOpSys_X86_LINUX ||
os == pwr_mOpSys_X86_64_LINUX)) {
os == pwr_mOpSys_X86_64_LINUX ||
os == pwr_mOpSys_X86_64_MACOS )) {
char msg[200];
sprintf( msg, "Error in NodeConfig object '%s', OperatingSystem is not valid", nodeconfig_name);
MsgWindow::message( 'E', msg, msgw_ePop_Default);
......@@ -2813,6 +2814,7 @@ pwr_tStatus lfu_check_opt_file( char *nodename, int bus_number, pwr_mOpSys opsys
case pwr_mOpSys_PPC_LINUX:
case pwr_mOpSys_X86_LINUX:
case pwr_mOpSys_X86_64_LINUX:
case pwr_mOpSys_X86_64_MACOS:
case pwr_mOpSys_CustomBuild:
fp <<
"$pwr_obj/rt_io_user.o -lpwr_rt -lpwr_usbio_dummy" << endl;
......
......@@ -3,7 +3,7 @@ link_rule_mk := 1
link = $(ldxx) -arch x86_64 -mmacosx-version-min=10.6 $(elinkflags) $(domap) -o $(pwr_exe)/co_help_gtk \
$(bld_dir)/co_help_gtk.o $(bld_dir)/help_main.o $(rt_msg_eobjs) \
$(pwr_eobj)/rt_io_user.o -L/usr/X11R6/lib\
$(pwr_eobj)/rt_io_user.o -L/sw/lib \
-L/opt/gnome/lib \
-lpwr_xtt_gtk -lpwr_xtt -lpwr_xtt_gtk -lpwr_xtt -lpwr_ge_gtk -lpwr_ge -lpwr_rt \
-lpwr_cow_gtk -lpwr_cow -lpwr_co -lpwr_flow_gtk -lpwr_flow -lpwr_glow_gtk -lpwr_glow \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment