From ec8c5a53de4605dbe47b6cf3586c82ccbbbace2e Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Tue, 18 Apr 2006 16:27:29 +0000 Subject: [PATCH] *** empty log message *** --- ase/awk/makefile.sol64 | 18 ++++++++++++++++++ ase/test/awk/awk.c | 14 +++++++++----- ase/test/awk/makefile.sco | 2 +- ase/test/awk/makefile.sol64 | 17 +++++++++++++++++ 4 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 ase/awk/makefile.sol64 create mode 100644 ase/test/awk/makefile.sol64 diff --git a/ase/awk/makefile.sol64 b/ase/awk/makefile.sol64 new file mode 100644 index 00000000..785be489 --- /dev/null +++ b/ase/awk/makefile.sol64 @@ -0,0 +1,18 @@ +SRCS = awk.c err.c tree.c tab.c map.c parse.c run.c sa.c val.c misc.c +OBJS = $(SRCS:.c=.o) +OUT = libxpawk.a + +CC = gcc +#CFLAGS = -m64 -O2 -Wall -std=c89 -pedantic -I../.. -DXP_AWK_STAND_ALONE +CFLAGS = -m64 -O2 -Wall -I../.. -DXP_AWK_STAND_ALONE + +all: $(OBJS) + ar cr $(OUT) $(OBJS) + +clean: + rm -rf $(OBJS) $(OUT) *.obj + +.SUFFIXES: .c .o +.c.o: + $(CC) $(CFLAGS) -c $< + diff --git a/ase/test/awk/awk.c b/ase/test/awk/awk.c index 21a09a4b..38a08254 100644 --- a/ase/test/awk/awk.c +++ b/ase/test/awk/awk.c @@ -1,5 +1,5 @@ /* - * $Id: awk.c,v 1.23 2006-04-16 04:31:38 bacon Exp $ + * $Id: awk.c,v 1.24 2006-04-18 16:27:29 bacon Exp $ */ #include @@ -58,7 +58,11 @@ static xp_ssize_t process_source ( #include #endif -#if defined(vms) || defined(__vms) || defined(_SCO_DS) +#if defined(__STAND_ALONE) && defined(_WIN32) +#define xp_main _tmain +#endif + +#if defined(__STAND_ALONE) && !defined(_WIN32) int main (int argc, char* argv[]) #else int xp_main (int argc, xp_char_t* argv[]) @@ -89,7 +93,7 @@ int xp_main (int argc, xp_char_t* argv[]) if (argc == 2) { -#if defined(vms) || defined(__vms) || defined(_SCO_DS) +#if defined(__STAND_ALONE) && !defined(_WIN32) if (strcmp(argv[1], "-m") == 0) #else if (xp_strcmp(argv[1], XP_TEXT("-m")) == 0) @@ -101,7 +105,7 @@ int xp_main (int argc, xp_char_t* argv[]) if (xp_awk_parse(awk) == -1) { -#if defined(_SCO_DS) && defined(XP_CHAR_IS_WCHAR) +#if defined(__STAND_ALONE) && !defined(_WIN32) && defined(XP_CHAR_IS_WCHAR) xp_printf ( XP_TEXT("error: cannot parse program - [%d] %ls\n"), xp_awk_geterrnum(awk), xp_awk_geterrstr(awk)); @@ -116,7 +120,7 @@ int xp_main (int argc, xp_char_t* argv[]) if (xp_awk_run(awk) == -1) { -#if defined(_SCO_DS) && defined(XP_CHAR_IS_WCHAR) +#if defined(__STAND_ALONE) && !defined(_WIN32) && defined(XP_CHAR_IS_WCHAR) xp_printf ( XP_TEXT("error: cannot run program - [%d] %ls\n"), xp_awk_geterrnum(awk), xp_awk_geterrstr(awk)); diff --git a/ase/test/awk/makefile.sco b/ase/test/awk/makefile.sco index 681a0578..4d00caaf 100644 --- a/ase/test/awk/makefile.sco +++ b/ase/test/awk/makefile.sco @@ -9,7 +9,7 @@ awk: awk.o $(CC) -o awk awk.o $(LDFLAGS) $(LIBS) clean: - rm -f *.obj awk + rm -f *.o awk .SUFFIXES: .c .o .c.o: diff --git a/ase/test/awk/makefile.sol64 b/ase/test/awk/makefile.sol64 new file mode 100644 index 00000000..cd784815 --- /dev/null +++ b/ase/test/awk/makefile.sol64 @@ -0,0 +1,17 @@ +CC = gcc +CFLAGS = -m64 -Wall -O2 -I../../.. -D__STAND_ALONE +LDFLAGS = -m64 -L../../bas -L../../awk +LIBS = -lxpawk -lm + +all: awk + +awk: awk.o + $(CC) -o awk awk.o $(LDFLAGS) $(LIBS) + +clean: + rm -f *.o awk + +.SUFFIXES: .c .o +.c.o: + $(CC) -c $(CFLAGS) $< +