2007-05-02 01:07:00 +00:00
|
|
|
|
|
|
|
# ilink32.exe link.exe
|
|
|
|
# -aa /subsystem:windows
|
|
|
|
# -ap /subsystem:console
|
|
|
|
# -ad /subsystem:native
|
|
|
|
#
|
|
|
|
# -Tpe
|
|
|
|
# -Tpd /dll
|
2008-02-09 03:04:38 +00:00
|
|
|
NAME = aseawk
|
2007-05-02 01:07:00 +00:00
|
|
|
|
2008-02-08 01:03:06 +00:00
|
|
|
!ifndef MODE
|
|
|
|
MODE = release
|
|
|
|
!endif
|
|
|
|
|
2007-05-02 01:07:00 +00:00
|
|
|
CC = bcc32
|
2008-02-08 01:03:06 +00:00
|
|
|
CXX = bcc32
|
2007-05-02 01:07:00 +00:00
|
|
|
LD = ilink32
|
2008-02-09 03:04:38 +00:00
|
|
|
JAVAC = javac
|
|
|
|
JAR = jar
|
|
|
|
|
|
|
|
CFLAGS = -WM -WU -RT- -w -q -I..\..\..
|
|
|
|
CXXFLAGS = -WM -WU -RT- -w -q -I..\..\..
|
|
|
|
LDFLAGS = -ap -Tpe -Gn -c -q -L..\..\$(MODE)\lib -L\progra~1\borland\bds\4.0\lib
|
|
|
|
LIBS = asecmn.lib aseawk.lib aseutl.lib import32.lib cw32mt.lib
|
|
|
|
LIBS_CXX = $(LIBS) "aseawk++.lib"
|
2007-05-02 01:07:00 +00:00
|
|
|
STARTUP = c0x32w.obj
|
|
|
|
|
2008-02-09 03:04:38 +00:00
|
|
|
JAVACFLAGS = -classpath ..\..\$(MODE)\lib\aseawk.jar;. -Xlint:unchecked
|
2007-05-02 01:07:00 +00:00
|
|
|
|
2008-02-09 03:04:38 +00:00
|
|
|
OUT_DIR = ..\..\$(MODE)\bin
|
|
|
|
OUT_FILE_BIN = $(OUT_DIR)\$(NAME).exe
|
|
|
|
OUT_FILE_BIN_CXX = "$(OUT_DIR)\$(NAME)++.exe"
|
|
|
|
OUT_FILE_JAR = $(OUT_DIR)\$(NAME).jar
|
2007-05-02 01:07:00 +00:00
|
|
|
|
2008-02-09 03:04:38 +00:00
|
|
|
TMP_DIR = $(MODE)
|
|
|
|
TMP_DIR_CXX = $(TMP_DIR)\cxx
|
|
|
|
TMP_DIR_JAR = $(TMP_DIR)\java
|
2007-05-02 01:07:00 +00:00
|
|
|
|
2008-02-09 03:04:38 +00:00
|
|
|
OBJ_FILES_BIN = $(TMP_DIR)\awk.obj
|
|
|
|
OBJ_FILES_BIN_CXX = $(TMP_DIR_CXX)\Awk.obj
|
2007-05-02 01:07:00 +00:00
|
|
|
|
2008-02-09 03:04:38 +00:00
|
|
|
OBJ_FILES_JAR = \
|
|
|
|
$(TMP_DIR_JAR)\AseAwk.class \
|
|
|
|
$(TMP_DIR_JAR)\AseAwkPanel.class \
|
|
|
|
$(TMP_DIR_JAR)\AseAwkApplet.class
|
|
|
|
|
|
|
|
TARGETS = bin
|
|
|
|
|
|
|
|
!if "$(JAVA_HOME)" != ""
|
|
|
|
TARGETS = $(TARGETS) jar
|
|
|
|
!endif
|
|
|
|
|
|
|
|
!IF "$(MODE)" == "debug"
|
|
|
|
CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG
|
|
|
|
CXXFLAGS = $(CXXFLAGS) -D_DEBUG -DDEBUG
|
|
|
|
!ELSEIF "$(MODE)" == "release"
|
|
|
|
CFLAGS = $(CFLAGS) -DNDEBUG -O2
|
|
|
|
CXXFLAGS = $(CXXFLAGS) -DNDEBUG -O2
|
|
|
|
!ELSE
|
|
|
|
CFLAGS = $(CFLAGS)
|
|
|
|
CXXFLAGS = $(CXXFLAGS)
|
|
|
|
!ENDIF
|
|
|
|
|
|
|
|
all: $(TARGETS)
|
|
|
|
|
|
|
|
bin: $(OUT_FILE_BIN) $(OUT_FILE_BIN_CXX)
|
|
|
|
|
|
|
|
jar: $(OUT_FILE_JAR)
|
|
|
|
|
|
|
|
$(OUT_FILE_BIN): $(TMP_DIR) $(OUT_DIR) $(OBJ_FILES_BIN)
|
|
|
|
$(LD) $(LDFLAGS) $(STARTUP) $(OBJ_FILES_BIN),$@,,$(LIBS),,
|
|
|
|
|
|
|
|
$(OUT_FILE_BIN_CXX): $(TMP_DIR_CXX) $(OUT_FILE_BIN) $(OBJ_FILES_BIN_CXX)
|
|
|
|
$(LD) $(LDFLAGS) $(STARTUP) $(OBJ_FILES_BIN_CXX),$@,,$(LIBS_CXX),,
|
2007-05-02 01:07:00 +00:00
|
|
|
|
2008-02-09 03:04:38 +00:00
|
|
|
$(OUT_FILE_JAR): $(TMP_DIR_JAR) $(OBJ_FILES_JAR)
|
|
|
|
$(JAR) -xvf ..\..\$(MODE)\lib\aseawk.jar
|
|
|
|
$(JAR) -cvfm $(OUT_FILE_JAR) manifest ase -C $(TMP_DIR_JAR) .
|
|
|
|
|
|
|
|
$(TMP_DIR)\awk.obj: awk.c
|
|
|
|
$(CC) $(CFLAGS) -o$@ -c awk.c
|
|
|
|
|
|
|
|
$(TMP_DIR_CXX)\Awk.obj: Awk.cpp
|
|
|
|
$(CC) $(CXXFLAGS) -o$@ -c Awk.cpp
|
|
|
|
|
|
|
|
$(TMP_DIR_JAR)\AseAwk.class: AseAwk.java
|
|
|
|
$(JAVAC) $(JAVACFLAGS) -d $(TMP_DIR_JAR) AseAwk.java
|
|
|
|
|
|
|
|
$(TMP_DIR_JAR)\AseAwkApplet.class: AseAwkApplet.java
|
|
|
|
$(JAVAC) $(JAVACFLAGS) -d $(TMP_DIR_JAR) AseAwkApplet.java
|
|
|
|
|
|
|
|
$(TMP_DIR_JAR)\AseAwkPanel.class: AseAwkPanel.java
|
|
|
|
$(JAVAC) $(JAVACFLAGS) -d $(TMP_DIR_JAR) AseAwkPanel.java
|
|
|
|
|
|
|
|
$(OUT_DIR):
|
|
|
|
-md $(OUT_DIR)
|
|
|
|
|
|
|
|
$(TMP_DIR):
|
|
|
|
-md $(TMP_DIR)
|
|
|
|
|
|
|
|
$(TMP_DIR_CXX): $(TMP_DIR)
|
|
|
|
-md $(TMP_DIR_CXX)
|
|
|
|
|
|
|
|
$(TMP_DIR_JAR): $(TMP_DIR)
|
|
|
|
-md $(TMP_DIR_JAR)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-del $(OUT_FILE_BIN)
|
|
|
|
-del $(OUT_FILE_BIN_CXX)
|
|
|
|
-del $(OBJ_FILES_BIN)
|
|
|
|
-del $(OBJ_FILES_BIN_CXX)
|
|
|
|
-del $(OUT_FILE_JAR)
|
|
|
|
-del $(OBJ_FILES_JAR)
|
|
|
|
-del $(TMP_DIR)\*.class
|
2007-05-02 01:07:00 +00:00
|
|
|
|