39 lines
730 B
Makefile
39 lines
730 B
Makefile
OUT = libaseawk.a
|
|
|
|
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)
|
|
|
|
CC = @CC@
|
|
AR = ar
|
|
RANLIB = @RANLIB@
|
|
CFLAGS = @CFLAGS@ -I@abs_top_builddir@/.. -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/$(PLATFORM)
|
|
LDFLAGS = @LDFLAGS@
|
|
LIBS = @LIBS@
|
|
|
|
JAVAC = javac
|
|
JAVACFLAGS = -classpath ../..
|
|
|
|
all: lib
|
|
|
|
lib: $(C_OBJS)
|
|
$(AR) cr $(OUT) $(OBJS)
|
|
|
|
jni: lib $(JNI_OBJS) $(JAVA_OBJS)
|
|
|
|
clean:
|
|
rm -rf $(OBJS) $(OUT) *.o
|
|
|
|
.SUFFIXES: .c .o .java .class
|
|
.c.o:
|
|
$(CC) $(CFLAGS) -c $<
|
|
|
|
.java.class:
|
|
$(JAVAC) $(JAVACFLAGS) $<
|
|
|