Skip to content

Commit

Permalink
Merge pull request #182 from asfadmin/jsn
Browse files Browse the repository at this point in the history
Add 6 SConscripts.
  • Loading branch information
khogenso committed Oct 28, 2013
2 parents 329b263 + b1b9441 commit 0d299a2
Show file tree
Hide file tree
Showing 8 changed files with 234 additions and 0 deletions.
6 changes: 6 additions & 0 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ src_subs = [
"refine_geolocation",
"shift_geolocation",
"flip",
"write_ppf",
"analyze_yaw",
"fftMatch",
"fit_warp",
"libasf_remap",
"remap",
]

# do the actual building
Expand Down
36 changes: 36 additions & 0 deletions src/analyze_yaw/SConscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import os.path

Import("globalenv")
localenv = globalenv.Clone()

localenv.AppendUnique(CPPPATH = [
"#src/asf/",
"#include/",
"#src/asf_meta/",
"#src/libasf_proj/",
"#src/libasf_raster/",
"#src/libasf_sar",
])

localenv.ParseConfig("pkg-config --cflags --libs libgeotiff")
localenv.ParseConfig("pkg-config --cflags --libs gsl")
localenv.ParseConfig("pkg-config --cflags --libs glib-2.0")

localenv.AppendUnique(LIBS = [
"asf",
"asf_proj",
"asf_meta",
])

head_build_dir, tail_build_dir = os.path.split(Dir(".").path)

localenv.AppendUnique(LIBPATH = [
"#" + os.path.join(head_build_dir, "asf"),
"#" + os.path.join(head_build_dir, "libasf_proj"),
"#" + os.path.join(head_build_dir, "asf_meta"),
])


bins = localenv.Program("analyze_yaw", Glob("*.c"))

globalenv.Install(globalenv["inst_dirs"]["bins"], bins)
46 changes: 46 additions & 0 deletions src/fftMatch/SConscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import os.path

Import("globalenv")
localenv = globalenv.Clone()

localenv.AppendUnique(CPPPATH = [
"#src/asf/",
"#include/",
"#src/asf_meta/",
"#src/libasf_proj/",
"#src/libasf_raster/",
])

localenv.ParseConfig("pkg-config --cflags --libs libgeotiff")
localenv.ParseConfig("pkg-config --cflags --libs gsl")
localenv.ParseConfig("pkg-config --cflags --libs libpng15")
localenv.ParseConfig("pkg-config --cflags --libs glib-2.0")

localenv.AppendUnique(LIBS = [
"asf",
"asf_proj",
"asf_raster",
"asf_meta",
"asf_fft",
])

head_build_dir, tail_build_dir = os.path.split(Dir(".").path)

localenv.AppendUnique(LIBPATH = [
"#" + os.path.join(head_build_dir, "asf"),
"#" + os.path.join(head_build_dir, "libasf_proj"),
"#" + os.path.join(head_build_dir, "asf_meta"),
"#" + os.path.join(head_build_dir, "asf_fft"),
"#" + os.path.join(head_build_dir, "libasf_raster"),
])


bins = [
localenv.Program("fftMatch", ["fftMatch.c"]),
localenv.Program("fftMatchGrid", ["fftMatchGrid.c"]),
]

docs = localenv.File("fftMatch.man")

globalenv.Install(globalenv["inst_dirs"]["bins"], bins)
globalenv.Install(globalenv["inst_dirs"]["docs"], docs)
42 changes: 42 additions & 0 deletions src/fit_warp/SConscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import os.path

Import("globalenv")
localenv = globalenv.Clone()

localenv.AppendUnique(CPPPATH = [
"#src/asf/",
"#include/",
"#src/asf_meta/",
"#src/libasf_proj/",
"#src/libasf_raster/",
])

localenv.ParseConfig("pkg-config --cflags --libs libgeotiff")
localenv.ParseConfig("pkg-config --cflags --libs gsl")
localenv.ParseConfig("pkg-config --cflags --libs libpng15")
localenv.ParseConfig("pkg-config --cflags --libs glib-2.0")

localenv.AppendUnique(LIBS = [
"asf",
"asf_proj",
"asf_raster",
"asf_meta",
"asf_fft",
])

head_build_dir, tail_build_dir = os.path.split(Dir(".").path)

localenv.AppendUnique(LIBPATH = [
"#" + os.path.join(head_build_dir, "asf"),
"#" + os.path.join(head_build_dir, "libasf_proj"),
"#" + os.path.join(head_build_dir, "asf_meta"),
"#" + os.path.join(head_build_dir, "asf_fft"),
"#" + os.path.join(head_build_dir, "libasf_raster"),
])


bins = localenv.Program("fit_warp", Glob("*.c"))
docs = localenv.File(["fit_warp.1"])

globalenv.Install(globalenv["inst_dirs"]["bins"], bins)
globalenv.Install(globalenv["inst_dirs"]["docs"], docs)
1 change: 1 addition & 0 deletions src/libasf_raster/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ libs = localenv.SharedLibrary("libasf_raster", [
"raster_calc.c",
"diffimage.c",
"spline_eval.c",
"fit_warp.c",
])

globalenv.Install(globalenv["inst_dirs"]["libs"], libs)
Expand Down
26 changes: 26 additions & 0 deletions src/libasf_remap/SConscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import os.path

Import("globalenv")
localenv = globalenv.Clone()

localenv.AppendUnique(CPPPATH = [
"#src/asf/",
"#include/",
"#src/asf_meta/",
"#src/libasf_proj/",
])

localenv.ParseConfig("pkg-config --cflags --libs libgeotiff")

localenv.AppendUnique(LIBS = [
])

head_build_dir, tail_build_dir = os.path.split(Dir(".").path)

localenv.AppendUnique(LIBPATH = [
])


libs = localenv.SharedLibrary("libasf_remap", Glob("*.c"))

globalenv.Install(globalenv["inst_dirs"]["libs"], libs)
35 changes: 35 additions & 0 deletions src/remap/SConscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import os.path

Import("globalenv")
localenv = globalenv.Clone()

localenv.AppendUnique(CPPPATH = [
"#src/asf/",
"#include/",
"#src/libasf_remap",
])

localenv.ParseConfig("pkg-config --cflags --libs gsl")

localenv.AppendUnique(LIBS = [
"asf",
"asf_proj",
"asf_meta",
"asf_remap",
])

head_build_dir, tail_build_dir = os.path.split(Dir(".").path)

localenv.AppendUnique(LIBPATH = [
"#" + os.path.join(head_build_dir, "asf"),
"#" + os.path.join(head_build_dir, "libasf_proj"),
"#" + os.path.join(head_build_dir, "asf_meta"),
"#" + os.path.join(head_build_dir, "libasf_remap"),
])


bins = localenv.Program("remap", Glob("*.c"))
docs = localenv.File(["remap.1"])

globalenv.Install(globalenv["inst_dirs"]["bins"], bins)
globalenv.Install(globalenv["inst_dirs"]["docs"], docs)
42 changes: 42 additions & 0 deletions src/write_ppf/SConscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import os.path

Import("globalenv")
localenv = globalenv.Clone()

localenv.AppendUnique(CPPPATH = [
"#src/asf/",
"#include/",
"#src/asf_meta/",
"#src/libasf_proj/",
"#src/libasf_import/",
])

localenv.ParseConfig("pkg-config --cflags --libs libgeotiff")
localenv.ParseConfig("pkg-config --cflags --libs gsl")

localenv.AppendUnique(LIBS = [
"asf",
"asf_import",
"asf_proj",
"asf_raster",
"asf_meta",
"asf_sar",
"asf_fft",
])

head_build_dir, tail_build_dir = os.path.split(Dir(".").path)

localenv.AppendUnique(LIBPATH = [
"#" + os.path.join(head_build_dir, "asf"),
"#" + os.path.join(head_build_dir, "libasf_proj"),
"#" + os.path.join(head_build_dir, "asf_meta"),
"#" + os.path.join(head_build_dir, "libasf_sar"),
"#" + os.path.join(head_build_dir, "asf_fft"),
"#" + os.path.join(head_build_dir, "libasf_import"),
"#" + os.path.join(head_build_dir, "libasf_raster"),
])


bins = localenv.Program("write_ppf", Glob("*.c"))

globalenv.Install(globalenv["inst_dirs"]["bins"], bins)

0 comments on commit 0d299a2

Please sign in to comment.