Commit 90567727 authored by claes's avatar claes

Rules for cpp

parent 0ab93446
...@@ -10,7 +10,7 @@ ld := gcc ...@@ -10,7 +10,7 @@ ld := gcc
ldxx := g++ ldxx := g++
linkflags := -g -L/usr/local/lib -L$(pwr_obj) -L$(pwrp_obj) -lm -lrt linkflags := -g -L/usr/local/lib -L$(pwr_obj) -L$(pwrp_obj) -lm -lrt
cflags := -c -g -Wall -DGNU_SOURCE -D_REENTRANT cflags := -c -g -Wall -DGNU_SOURCE -D_REENTRANT
cxxflags := $(cflags) cxxflags := $(cflags) -Wno-deprecated
linkflags := -g -L/usr/local/lib -L$(pwr_lib) -L$(pwrp_lib) -lrt linkflags := -g -L/usr/local/lib -L$(pwr_lib) -L$(pwrp_lib) -lrt
csetos := -DOS_LINUX=1 -DOS=linux -DHW_X86=1 -DHW=x86 csetos := -DOS_LINUX=1 -DOS=linux -DHW_X86=1 -DHW=x86
cinc := -I$(pwr_inc) -I$(pwrp_inc) -I$(pwrp_cmn)/common/inc -I/usr/local/include -I/usr/X11R6/include -I$(jdk)/include -I$(jdk)/include/linux cinc := -I$(pwr_inc) -I$(pwrp_inc) -I$(pwrp_cmn)/common/inc -I/usr/local/include -I/usr/X11R6/include -I$(jdk)/include -I$(jdk)/include/linux
...@@ -18,7 +18,7 @@ cinc := -I$(pwr_inc) -I$(pwrp_inc) -I$(pwrp_cmn)/common/inc -I/usr/local/includ ...@@ -18,7 +18,7 @@ cinc := -I$(pwr_inc) -I$(pwrp_inc) -I$(pwrp_cmn)/common/inc -I/usr/local/includ
.SUFFIXES: .SUFFIXES:
$(pwrp_inc)/%.h : $(pwrp_db)/userclasses.wb_load $(pwrp_inc)/pwr_%classes.h : $(pwrp_db)/%.wb_load
@ echo "Create struct $(notdir $(source))" @ echo "Create struct $(notdir $(source))"
@ wb_cmd create struct @ wb_cmd create struct
@ co_convert -x -d $(pwrp_exe) $(source) @ co_convert -x -d $(pwrp_exe) $(source)
...@@ -36,6 +36,15 @@ $(pwrp_obj)/%.o : %.c ...@@ -36,6 +36,15 @@ $(pwrp_obj)/%.o : %.c
@ $(cc) $(cflags) $(csetos) $(cinc) -c -o $% $(source) @ $(cc) $(cflags) $(csetos) $(cinc) -c -o $% $(source)
@ ar r $(target) $% @ ar r $(target) $%
$(pwrp_obj)/%.o : %.cpp
@ echo "cc $(notdir $(source))"
@ $(cxx) $(cxxflags) $(csetos) $(cinc) -c -o $(target) $(source)
($(pwrp_obj)/%.o) : %.cpp
@ echo "cc ar $(notdir $(source))"
@ $(cxx) $(cxxflags) $(csetos) $(cinc) -c -o $% $(source)
@ ar r $(target) $%
$(pwrp_inc)/%.h: %.msg $(pwrp_inc)/%.h: %.msg
@ echo "Msg to h $(source)" @ echo "Msg to h $(source)"
@ $(pwr_exe)/tools_msg2cmsg $(source) $(pwrp_obj)/$(tname).cmsg $(pwrp_inc)/$(tname).h @ $(pwr_exe)/tools_msg2cmsg $(source) $(pwrp_obj)/$(tname).cmsg $(pwrp_inc)/$(tname).h
......
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