53 lines
1.1 KiB
Makefile
53 lines
1.1 KiB
Makefile
#
|
|
# $Id: makefile.in,v 1.6 2007/11/11 15:06:47 bacon Exp $
|
|
#
|
|
|
|
TOP_DIR = @abs_top_builddir@
|
|
|
|
CC = @CC@
|
|
CXX = @CXX@
|
|
CFLAGS = @CFLAGS@ -I$(TOP_DIR)/inc
|
|
CXXFLAGS = @CXXFLAGS@ -I$(TOP_DIR)/inc
|
|
LDFLAGS = @LDFLAGS@ -L$(TOP_DIR)/out/@BUILDMODE@/lib
|
|
LIBS = @LIBS@ -laseawk -lasecmn -laseutl -lm
|
|
LIBS_CXX = -laseawk++ ${LIBS}
|
|
MODE = @BUILDMODE@
|
|
|
|
STRIP = @STRIP@
|
|
AR = @AR@
|
|
|
|
LIBTOOL_COMPILE = $(TOP_DIR)/libtool --mode=compile
|
|
LIBTOOL_LINK = $(TOP_DIR)/libtool --mode=link
|
|
|
|
OUT_DIR= $(TOP_DIR)/out/$(MODE)
|
|
OUT_DIR_LIB = $(OUT_DIR)/lib
|
|
OUT_DIR_BIN = $(OUT_DIR)/cmd
|
|
TMP_DIR = $(MODE)
|
|
|
|
ASEAWK_LIB =
|
|
|
|
all: build
|
|
|
|
build: $(TMP_DIR) $(OUT_DIR_BIN) $(OUT_DIR_BIN)/aseawk $(OUT_DIR_BIN)/aseawk++
|
|
|
|
$(OUT_DIR_BIN)/aseawk: awk.c
|
|
$(LIBTOOL_LINK) $(CC) $(CFLAGS) -o $@ awk.c $(LDFLAGS) $(LIBS)
|
|
$(STRIP) $@
|
|
|
|
$(OUT_DIR_BIN)/aseawk++: Awk.cpp
|
|
$(LIBTOOL_LINK) $(CXX) $(CXXFLAGS) -o $@ Awk.cpp $(LDFLAGS) $(LIBS_CXX)
|
|
$(STRIP) $@
|
|
|
|
$(OUT_DIR_BIN):
|
|
mkdir -p $(OUT_DIR_BIN)
|
|
|
|
$(TMP_DIR):
|
|
mkdir -p $(TMP_DIR)
|
|
|
|
$(TMP_DIR)/cj:
|
|
mkdir -p $(TMP_DIR)/cj
|
|
|
|
clean:
|
|
rm -rf $(OUT_DIR_BIN)/aseawk $(OUT_DIR_BIN)/aseawk++
|
|
|