51 lines
953 B
Makefile
51 lines
953 B
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
|
|
|
|
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
|
|
$(CC) $(CFLAGS) -o $@ awk.c $(LDFLAGS) $(LIBS)
|
|
$(STRIP) $@
|
|
|
|
$(OUT_DIR_BIN)/aseawk++: Awk.cpp
|
|
$(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++
|
|
|