diff --git a/ase/awk/makefile.tcc b/ase/awk/makefile.dos.tcc similarity index 100% rename from ase/awk/makefile.tcc rename to ase/awk/makefile.dos.tcc diff --git a/ase/awk/makefile.in b/ase/awk/makefile.in index 658b439a..d409fddc 100644 --- a/ase/awk/makefile.in +++ b/ase/awk/makefile.in @@ -25,7 +25,6 @@ lib: $(C_OBJS) $(AR) cr $(OUT) $(OBJS) jni: lib $(JNI_OBJS) $(JAVA_OBJS) - $(GCC) clean: rm -rf $(OBJS) $(OUT) *.o diff --git a/ase/awk/makefile.lnx.gcc b/ase/awk/makefile.lnx.gcc new file mode 100644 index 00000000..c13b002b --- /dev/null +++ b/ase/awk/makefile.lnx.gcc @@ -0,0 +1,44 @@ +OUT = libaseawk + +C_SRCS = awk.c err.c tree.c str.c tab.c map.c parse.c \ + run.c rec.c val.c func.c misc.c extio.c rex.c +JNI_SRCS = jni.c +JAVA_SRCS = Exception.java Extio.java Awk.java StdAwk.java + +C_OBJS = $(C_SRCS:.c=.o) +JNI_OBJS = $(JNI_SRCS:.c=.o) +JAVA_OBJS = $(JAVA_SRCS:.java=.class) + +JNI_INCPATH= \ + -I"$(JAVA_HOME)/include" \ + -I"$(JAVA_HOME)/include/linux" + +CC = gcc +AR = ar +LD = ld +RANLIB = ranlib +CFLAGS = -Wall -O2 -D_REENTRANT -D_THREAD_SAFE -fPIC -I../.. $(JNI_INCPATH) +LDFLAGS = +LIBS = + +JAVAC = javac +JAVACFLAGS = -classpath ../.. + +all: lib jni + +lib: $(C_OBJS) + $(AR) cr $(OUT).a $(C_OBJS) + +jni: lib $(JNI_OBJS) $(JAVA_OBJS) + $(LD) -fPIC -shared -soname $(OUT).so -o $(OUT).so -L . -l aseawk jni.o + +clean: + rm -rf $(C_OBJS) $(JNI_OBJS) $(JAVA_OBJS) $(OUT).a $(OUT).so *.o + +.SUFFIXES: .c .o .java .class +.c.o: + $(CC) $(CFLAGS) -c $< + +.java.class: + $(JAVAC) $(JAVACFLAGS) $< + diff --git a/ase/awk/makefile.bcc b/ase/awk/makefile.msw.bcc similarity index 91% rename from ase/awk/makefile.bcc rename to ase/awk/makefile.msw.bcc index 46b43d4f..760737a3 100644 --- a/ase/awk/makefile.bcc +++ b/ase/awk/makefile.msw.bcc @@ -10,8 +10,8 @@ JNI_OBJS = $(JNI_SRCS:.c=.obj) JAVA_OBJS = $(JAVA_SRCS:.java=.class) JNI_INCPATH = \ - -I"C:\Program Files\Java\jdk1.5.0_09\include" \ - -I"C:\Program Files\Java\jdk1.5.0_09\include\win32" + -I"$(JAVA_HOME)\include" \ + -I"$(JAVA_HOME\include\win32" BDS_LIBPATH = -L"c:\program files\borland\bds\4.0\lib" CC = bcc32 diff --git a/ase/awk/makefile.cl b/ase/awk/makefile.msw.cl similarity index 100% rename from ase/awk/makefile.cl rename to ase/awk/makefile.msw.cl diff --git a/ase/awk/makefile.sco b/ase/awk/makefile.sco.cc similarity index 100% rename from ase/awk/makefile.sco rename to ase/awk/makefile.sco.cc