Browse Source

update unix build

David Rose 23 years ago
parent
commit
692a1bcf28
4 changed files with 282 additions and 329 deletions
  1. 6 0
      dtool/Config.pp
  2. 6 6
      dtool/pptempl/Depends.pp
  3. 1 1
      dtool/pptempl/Template.gmsvc.pp
  4. 269 322
      dtool/pptempl/Template.unix.pp

+ 6 - 0
dtool/Config.pp

@@ -451,6 +451,12 @@
 //#defer ODIR Opt$[OPTIMIZE]-$[PLATFORM]$[USE_COMPILER]
 //#defer ODIR Opt$[OPTIMIZE]-$[PLATFORM]$[USE_COMPILER]
 #defer ODIR Opt$[OPTIMIZE]-$[PLATFORM]
 #defer ODIR Opt$[OPTIMIZE]-$[PLATFORM]
 
 
+// What is the normal extension of a compiled object file?
+#if $[WINDOWS_PLATFORM]
+  #define OBJ .obj
+#else
+  #define OBJ .o
+#endif
 
 
 
 
 ///////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////

+ 6 - 6
dtool/pptempl/Depends.pp

@@ -70,7 +70,7 @@
 
 
     // Define what the object files are.
     // Define what the object files are.
     #foreach file $[c_sources] $[cxx_sources] $[yxx_sources] $[lxx_sources]
     #foreach file $[c_sources] $[cxx_sources] $[yxx_sources] $[lxx_sources]
-      #define $[file]_obj $[patsubst %.c %.cxx %.yxx %.lxx,$[ODIR]/$[TARGET]_%.obj,$[file]]
+      #define $[file]_obj $[patsubst %.c %.cxx %.yxx %.lxx,$[ODIR]/$[TARGET]_%$[OBJ],$[file]]
       #push 1 $[file]_obj
       #push 1 $[file]_obj
     #end file
     #end file
 
 
@@ -81,7 +81,7 @@
         #define composite_file $[ODIR]/$[TARGET]_composite.cxx
         #define composite_file $[ODIR]/$[TARGET]_composite.cxx
         #set composite_list $[composite_list] $[composite_file]
         #set composite_list $[composite_list] $[composite_file]
         #define $[composite_file]_sources $[cxx_sources]
         #define $[composite_file]_sources $[cxx_sources]
-        #define $[composite_file]_obj $[ODIR]/$[TARGET]_composite.obj
+        #define $[composite_file]_obj $[ODIR]/$[TARGET]_composite$[OBJ]
         #push 1 $[composite_file]_sources
         #push 1 $[composite_file]_sources
         #push 1 $[composite_file]_obj
         #push 1 $[composite_file]_obj
         #set cxx_sources $[composite_file]
         #set cxx_sources $[composite_file]
@@ -92,7 +92,7 @@
         #define composite_file $[ODIR]/$[TARGET]_composite_c.c
         #define composite_file $[ODIR]/$[TARGET]_composite_c.c
         #set composite_list $[composite_list] $[composite_file]
         #set composite_list $[composite_list] $[composite_file]
         #define $[composite_file]_sources $[c_sources]
         #define $[composite_file]_sources $[c_sources]
-        #define $[composite_file]_obj $[ODIR]/$[TARGET]_composite_c.obj
+        #define $[composite_file]_obj $[ODIR]/$[TARGET]_composite_c$[OBJ]
         #push 1 $[composite_file]_sources
         #push 1 $[composite_file]_sources
         #push 1 $[composite_file]_obj
         #push 1 $[composite_file]_obj
         #set c_sources $[composite_file]
         #set c_sources $[composite_file]
@@ -105,21 +105,21 @@
     // tend to be very large files themselves.
     // tend to be very large files themselves.
     #foreach source_file $[yxx_sources] $[lxx_sources]
     #foreach source_file $[yxx_sources] $[lxx_sources]
       #define generated_file $[patsubst %.yxx %.lxx,%.cxx,$[source_file]]
       #define generated_file $[patsubst %.yxx %.lxx,%.cxx,$[source_file]]
-      #define $[generated_file]_obj $[patsubst %.yxx %.lxx,$[ODIR]/$[TARGET]_%.obj,$[source_file]]
+      #define $[generated_file]_obj $[patsubst %.yxx %.lxx,$[ODIR]/$[TARGET]_%$[OBJ],$[source_file]]
       #define $[generated_file]_sources $[source_file]
       #define $[generated_file]_sources $[source_file]
       #push 1 $[generated_file]_obj
       #push 1 $[generated_file]_obj
       #set cxx_sources $[cxx_sources] $[generated_file]
       #set cxx_sources $[cxx_sources] $[generated_file]
     #end source_file
     #end source_file
     #if $[get_igateoutput]
     #if $[get_igateoutput]
       #define generated_file $[get_igateoutput]
       #define generated_file $[get_igateoutput]
-      #define $[generated_file]_obj $[get_igateoutput:%.cxx=%.obj]
+      #define $[generated_file]_obj $[get_igateoutput:%.cxx=%$[OBJ]]
       #define $[generated_file]_sources $[get_igatescan]
       #define $[generated_file]_sources $[get_igatescan]
       #push 1 $[generated_file]_obj
       #push 1 $[generated_file]_obj
       #set cxx_sources $[cxx_sources] $[generated_file]
       #set cxx_sources $[cxx_sources] $[generated_file]
     #endif
     #endif
     #if $[get_igatemout]
     #if $[get_igatemout]
       #define generated_file $[get_igatemout]
       #define generated_file $[get_igatemout]
-      #define $[generated_file]_obj $[get_igatemout:%.cxx=%.obj]
+      #define $[generated_file]_obj $[get_igatemout:%.cxx=%$[OBJ]]
       #define $[generated_file]_sources none
       #define $[generated_file]_sources none
       #push 1 $[generated_file]_obj
       #push 1 $[generated_file]_obj
       #set cxx_sources $[cxx_sources] $[generated_file]
       #set cxx_sources $[cxx_sources] $[generated_file]

+ 1 - 1
dtool/pptempl/Template.gmsvc.pp

@@ -107,7 +107,7 @@
 // $[target_ipath] is the proper ipath to put on the command line,
 // $[target_ipath] is the proper ipath to put on the command line,
 // from the context of a particular target.
 // from the context of a particular target.
 
 
-#defer target_ipath $[TOPDIR] $[sort $[complete_ipath]] $[other_trees:%=%\include] $[get_ipath]
+#defer target_ipath $[TOPDIR] $[sort $[complete_ipath]] $[other_trees:%=%/include] $[get_ipath]
 
 
 // These are the complete set of extra flags the compiler requires.
 // These are the complete set of extra flags the compiler requires.
 #defer cflags $[get_cflags] $[CFLAGS] $[CFLAGS_OPT$[OPTIMIZE]] 
 #defer cflags $[get_cflags] $[CFLAGS] $[CFLAGS_OPT$[OPTIMIZE]] 

File diff suppressed because it is too large
+ 269 - 322
dtool/pptempl/Template.unix.pp


Some files were not shown because too many files changed in this diff