Skip to content

Commit

Permalink
mods by M. Bogner March-May 20011 for Athena to ISIS move project
Browse files Browse the repository at this point in the history
  • Loading branch information
mbogner committed May 25, 2011
1 parent 66b70cc commit e9cbf4a
Show file tree
Hide file tree
Showing 41 changed files with 1,481 additions and 36 deletions.
54 changes: 54 additions & 0 deletions Environ.10
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Environ
# $Id$

# This file defines constants which are used in HDB application makefiles.
# It must be placed in the HDB application root directory and must be
# included ("include") in every application or library makefile which uses
# these constants.

# This version was added and Edited by M. Bogner, Sutron Corporation to
# use for compilations of pro*c code on the Linux machine and to use
# the ORACLE 10 Libraries on the Database box.
# This file was created and edited by M. Bogner March 2011

# Environment variable HDB_ENV defines the root directory of an
# HDB application development environment. It should be set in
# your .cshrc_hdb_app file.

# directory which holds all HDB application binaries
HDB_APP_BIN = $(HDB_ENV)/bin64

# directory which holds all HDB specific library files
HDB_APP_LIB = $(HDB_ENV)/lib64

# directory which holds all HDB global include files
HDB_APP_INCLUDE = $(HDB_ENV)/include

# directory which holds TCL/TK include files
#TK_INCLUDES = /usr/include

# TCL/TK library files
#TK_LIBS = -ltk8.4 -ltcl8.4 -lm

# Oracle library files
ORACLE_LIB = -L$(ORACLE_HOME)/lib -lagent10 -lclient10 -lclntsh -lcommon10 -lcore10 -lgeneric10 -lmm -lpsa10 -lserver10 -lslax10 -lsql10 -lsqlplus -lvsn10

### ORACLE 9, Solaris Code below

# directory which holds TCL/TK include files
TK_INCLUDES = /usr/sfw/include

# TCL/TK library files
TK_LIBS = -L/usr/sfw/lib -ltk8.3 -ltcl8.3 -lm

# Oracle library files
#ORACLE_LIB = -L$(ORACLE_HOME)/lib32 -lagent9 -lclient9 -lclntsh -lcommon9 -lcore9 -lgeneric9 -lmm -lslax9 -lsql9 -lwtc9 -lvsn9

# all libraries required by HDB applications
# M Bogner Removed ldmi since dmi no longer used???
#HDB_LIBS = -L$(HDB_APP_LIB) -ldmi -lhdb -lutils $(ORACLE_LIB) -lhdb
HDB_LIBS = -L$(HDB_APP_LIB) -lhdb -lutils $(ORACLE_LIB) -lhdb

# Compiler
CC = gcc

4 changes: 2 additions & 2 deletions gentea/src/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# The version for use with C and INGRES follows:

include ../../Environ
include make_include
include ../../Environ.10
include make_include64

######################### Directives ###############################

Expand Down
32 changes: 32 additions & 0 deletions gentea/src/Makefile32
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# The version for use with C and INGRES follows:

include ../../Environ
include make_include

######################### Directives ###############################

TARGET = $(HDB_APP_BIN)/gentea
OBJS = \
$(OBJDIR)/readdata.o \
$(OBJDIR)/teacup.o \
$(OBJDIR)/gentea.o

main: $(TARGET)

clean:
rm -f $(TARGET) $(OBJS)

$(TARGET): $(OBJS)
$(CC) $(OBJS) $(LIBS) -o $(TARGET)

$(OBJDIR)/readdata.o: \
readdata.pc
proc iname=readdata.pc include=$(HDB_APP_INCLUDE)
$(CC) $(CFLAGS) -c readdata.c -o $@

$(OBJDIR)/gentea.o: gentea.c
$(CC) $(CFLAGS) -c gentea.c -o $@

$(OBJDIR)/teacup.o: teacup.c
$(CC) $(CFLAGS) -c teacup.c -o $@

32 changes: 32 additions & 0 deletions gentea/src/Makefile64
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# The version for use with C and INGRES follows:

include ../../Environ.10
include make_include64

######################### Directives ###############################

TARGET = $(HDB_APP_BIN)/gentea
OBJS = \
$(OBJDIR)/readdata.o \
$(OBJDIR)/teacup.o \
$(OBJDIR)/gentea.o

main: $(TARGET)

clean:
rm -f $(TARGET) $(OBJS)

$(TARGET): $(OBJS)
$(CC) $(OBJS) $(LIBS) -o $(TARGET)

$(OBJDIR)/readdata.o: \
readdata.pc
proc iname=readdata.pc include=$(HDB_APP_INCLUDE)
$(CC) $(CFLAGS) -c readdata.c -o $@

$(OBJDIR)/gentea.o: gentea.c
$(CC) $(CFLAGS) -c gentea.c -o $@

$(OBJDIR)/teacup.o: teacup.c
$(CC) $(CFLAGS) -c teacup.c -o $@

4 changes: 2 additions & 2 deletions green_data/src/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# The version for use with C and INGRES follows:

include ../../Environ
include make_include
include ../../Environ.10
include make_include64

######################### Directives ###############################

Expand Down
23 changes: 23 additions & 0 deletions green_data/src/Makefile32
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# The version for use with C and INGRES follows:

include ../../Environ
include make_include32

######################### Directives ###############################

TARGET = $(HDB_APP_BIN)/green_data
OBJS = \
$(OBJDIR)/green_data.o

main: $(TARGET)

$(TARGET): $(OBJS)
$(CC) $(OBJS) $(LIBS) -o $(TARGET)

$(OBJDIR)/green_data.o: \
green_data.pc
proc iname=green_data.pc include=$(HDB_APP_INCLUDE)
$(CC) $(CFLAGS) -c green_data.c -o $@

clean:
rm -f $(OBJDIR)/green_data.o
23 changes: 23 additions & 0 deletions green_data/src/Makefile64
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# The version for use with C and INGRES follows:

include ../../Environ.10
include make_include64

######################### Directives ###############################

TARGET = $(HDB_APP_BIN)/green_data
OBJS = \
$(OBJDIR)/green_data.o

main: $(TARGET)

$(TARGET): $(OBJS)
$(CC) $(OBJS) $(LIBS) -o $(TARGET)

$(OBJDIR)/green_data.o: \
green_data.pc
proc iname=green_data.pc include=$(HDB_APP_INCLUDE)
$(CC) $(CFLAGS) -c green_data.c -o $@

clean:
rm -f $(OBJDIR)/green_data.o
3 changes: 3 additions & 0 deletions green_data/src/green_data.pc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/* stdlib.h added by M. Bogner, Sutron Corporation 05-MAY-2011 to recompile on Linux machine */

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "dbutils.h"
Expand Down
7 changes: 7 additions & 0 deletions green_data/src/make_include32
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CC = gcc
APPDIR = $(HDB_ENV)/green_data
OBJDIR = $(APPDIR)/obj
INCLUDES = -I$(HDB_APP_INCLUDE)
LIBS = $(HDB_LIBS) -lm -ldl
CFLAGS = -ansi -Wall -g -DANSIPROTO -DDEBUG $(INCLUDES)

7 changes: 7 additions & 0 deletions green_data/src/make_include64
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CC = gcc
APPDIR = $(HDB_ENV)/green_data
OBJDIR = $(APPDIR)/obj64
INCLUDES = -I$(HDB_APP_INCLUDE)
LIBS = $(HDB_LIBS) -lm -ldl
CFLAGS = -ansi -Wall -g -DANSIPROTO -DDEBUG $(INCLUDES)

6 changes: 3 additions & 3 deletions hdbLib/src/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# hdbLib makefile
# hdbLib makefile64
# $Id$:

include ../../Environ
include ../../Environ.10

OBJDIR = $(HDB_ENV)/hdbLib/obj
OBJDIR = $(HDB_ENV)/hdbLib/obj64
INCLUDES = -I$(HDB_APP_INCLUDE)
LIBS = $(HDB_LIBS) -lm -ldl
CFLAGS = -ansi -Wall -c -g -DANSIPROTO $(INCLUDES)
Expand Down
157 changes: 157 additions & 0 deletions hdbLib/src/Makefile32
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
# hdbLib makefile
# $Id$:

include ../../Environ

OBJDIR = $(HDB_ENV)/hdbLib/obj
INCLUDES = -I$(HDB_APP_INCLUDE)
LIBS = $(HDB_LIBS) -lm -ldl
CFLAGS = -ansi -Wall -c -g -DANSIPROTO $(INCLUDES)

TARGET = $(HDB_APP_LIB)/libhdb.a

OBJS = \
$(OBJDIR)/SqlError.o \
$(OBJDIR)/SqlGetDBName.o \
$(OBJDIR)/SqlConnect.o \
$(OBJDIR)/SqlDate.o \
$(OBJDIR)/SqlDataSource.o \
$(OBJDIR)/SqlValidation.o \
$(OBJDIR)/SqlUnits.o \
$(OBJDIR)/SqlInterval.o \
$(OBJDIR)/SqlObjects.o \
$(OBJDIR)/SqlModel.o \
$(OBJDIR)/SqlGetDBName.o \
$(OBJDIR)/SqlCount.o \
$(OBJDIR)/SqlLookup.o \
$(OBJDIR)/SqlBaseKeys.o \
$(OBJDIR)/SqlChkModelRunID.o \
$(OBJDIR)/SqlGetSiteDataTypeIdWithName.o

GLOBAL_INCLUDE = \
$(HDB_APP_INCLUDE)/dbutils.h \
$(HDB_APP_INCLUDE)/defines.h \
$(HDB_APP_INCLUDE)/typedefs.h

INTERMED_PROC_FILES = \
SqlBaseKeys.c \
SqlChkModelRunID.c \
SqlConnect.c \
SqlCount.c \
SqlDataSource.c \
SqlDate.c \
SqlError.c \
SqlGetDBName.c \
SqlGetSiteDataTypeIdWithName.c \
SqlInterval.c \
SqlLookup.c \
SqlModel.c \
SqlObjects.c \
SqlUnits.c \
SqlValidation.c

$(TARGET) : $(OBJS)
rm -f $(HDB_APP_LIB)/libhdb.a
ar rv $(HDB_APP_LIB)/libhdb.a $(OBJS)
ranlib $(HDB_APP_LIB)/libhdb.a

clean:
rm -f $(OBJS)
rm -f $(TARGET)
rm -f $(INTERMED_PROC_FILES)
rm -f *.lis

$(OBJDIR)/SqlError.o : \
$(GLOBAL_INCLUDE) \
SqlError.pc
proc code=ansi_c iname=SqlError.pc include=$(HDB_APP_INCLUDE)
$(CC) $(CFLAGS) SqlError.c -o $@

$(OBJDIR)/SqlGetDBName.o : \
$(GLOBAL_INCLUDE) \
SqlGetDBName.pc
proc code=ansi_c iname=SqlGetDBName.pc include=$(HDB_APP_INCLUDE)
$(CC) $(CFLAGS) SqlGetDBName.c -o $@

$(OBJDIR)/SqlConnect.o : \
$(GLOBAL_INCLUDE) \
SqlConnect.pc
proc code=ansi_c iname=SqlConnect.pc include=$(HDB_APP_INCLUDE)
$(CC) $(CFLAGS) SqlConnect.c -o $@

$(OBJDIR)/SqlDate.o : \
$(GLOBAL_INCLUDE) \
SqlDate.pc
proc code=ansi_c iname=SqlDate.pc include=$(HDB_APP_INCLUDE)
$(CC) $(CFLAGS) SqlDate.c -o $@

$(OBJDIR)/SqlDataSource.o : \
$(GLOBAL_INCLUDE) \
SqlDataSource.pc
proc code=ansi_c iname=SqlDataSource.pc include=$(HDB_APP_INCLUDE)
$(CC) $(CFLAGS) SqlDataSource.c -o $@

$(OBJDIR)/SqlValidation.o : \
$(GLOBAL_INCLUDE) \
SqlValidation.pc
proc code=ansi_c iname=SqlValidation.pc include=$(HDB_APP_INCLUDE)
$(CC) $(CFLAGS) SqlValidation.c -o $@

$(OBJDIR)/SqlUnits.o: \
$(GLOBAL_INCLUDE) \
SqlUnits.pc
proc code=ansi_c iname=SqlUnits.pc include=$(HDB_APP_INCLUDE)
$(CC) $(CFLAGS) SqlUnits.c -o $@

$(OBJDIR)/SqlInterval.o: \
$(GLOBAL_INCLUDE) \
SqlInterval.pc
proc code=ansi_c char_map=string iname=SqlInterval.pc include=$(HDB_APP_INCLUDE)
$(CC) $(CFLAGS) SqlInterval.c -o $@

$(OBJDIR)/SqlObjects.o: \
$(GLOBAL_INCLUDE) \
SqlObjects.pc \
$(HDB_APP_INCLUDE)/utils.h
proc code=ansi_c iname=SqlObjects.pc include=$(HDB_APP_INCLUDE)
$(CC) $(CFLAGS) SqlObjects.c -o $@

$(OBJDIR)/SqlModel.o: \
$(GLOBAL_INCLUDE) \
SqlModel.pc \
$(HDB_APP_INCLUDE)/utils.h
proc code=ansi_c CHAR_MAP=string sqlcheck=semantics userid=$(DBA)/$(DBA_PASSWD) iname=SqlModel.pc include=$(HDB_APP_INCLUDE)
$(CC) $(CFLAGS) SqlModel.c -o $@

$(OBJDIR)/SqlCount.o: \
$(GLOBAL_INCLUDE) \
SqlCount.pc \
$(HDB_APP_INCLUDE)/utils.h
proc code=ansi_c iname=SqlCount.pc include=$(HDB_APP_INCLUDE)
$(CC) $(CFLAGS) SqlCount.c -o $@

$(OBJDIR)/SqlLookup.o: \
$(GLOBAL_INCLUDE) \
SqlLookup.pc \
$(HDB_APP_INCLUDE)/utils.h
proc code=ansi_c iname=SqlLookup.pc include=$(HDB_APP_INCLUDE)
$(CC) $(CFLAGS) SqlLookup.c -o $@

$(OBJDIR)/SqlBaseKeys.o: \
$(GLOBAL_INCLUDE) \
SqlBaseKeys.pc \
$(HDB_APP_INCLUDE)/utils.h
proc code=ansi_c iname=SqlBaseKeys.pc include=$(HDB_APP_INCLUDE)
$(CC) $(CFLAGS) SqlBaseKeys.c -o $@

$(OBJDIR)/SqlChkModelRunID.o: \
$(GLOBAL_INCLUDE) \
SqlChkModelRunID.pc
proc code=ansi_c iname=SqlChkModelRunID.pc include=$(HDB_APP_INCLUDE)
$(CC) $(CFLAGS) SqlChkModelRunID.c -o $@

$(OBJDIR)/SqlGetSiteDataTypeIdWithName.o: \
$(GLOBAL_INCLUDE) \
SqlGetSiteDataTypeIdWithName.pc
proc code=ansi_c iname=SqlGetSiteDataTypeIdWithName.pc include=$(HDB_APP_INCLUDE)
$(CC) $(CFLAGS) SqlGetSiteDataTypeIdWithName.c -o $@
Loading

0 comments on commit e9cbf4a

Please sign in to comment.