all: dw.tab.o dw.yy.o
.c.o:
- $(CC) $(CFLAGS) -fPIC -c -o $@ $<
+ $(CC) $(CFLAGS) $(PIC) -c -o $@ $<
dw.tab.c: dw.y
$(YACC) $(YFLAGS) -o $@ dw.y
double __dw_atof(const char* str);
char* __dw_strcat(const char* a, const char* b);
+char* __dw_strdup(const char* a);
+
+#ifdef NO_STRDUP
+#define strdup __dw_strdup
+#endif
+
+#ifdef __VBCC__
+int isatty(int fd){
+ return 0;
+}
+int fileno(FILE* fp){
+ return 0;
+}
+#endif
+
char* str = NULL;
void proc_esc(void){
$(RANLIB) $@
.c.o:
- $(CC) $(CFLAGS) -DPLATFORM_M=\"$(PLATFORM_M)\" -DPLATFORM_P=\"$(PLATFORM_P)\" -fPIC -c -o $@ $<
+ $(CC) $(CFLAGS) -DPLATFORM_M=\"$(PLATFORM_M)\" -DPLATFORM_P=\"$(PLATFORM_P)\" $(PIC) -c -o $@ $<
clean:
rm -f *.o *.so *.dll *.a *.lib
const char* dataworks_platform = "WatcomC/"
#elif defined(__APPLE__)
const char* dataworks_platform = "MacOSX/"
+#elif defined(__VBCC__)
+#undef SUPPORTED
+const char* dataworks_platform = "VBCC/"
#else
#undef SUPPORTED
const char* dataworks_platform = "Unknown/"
#endif
+#ifdef __VBCC__
+#ifdef AMIGA
+ "amiga (amiga)";
+#else
+ "unknown (unknown)";
+#endif
+;
+#else
PLATFORM_M " (" PLATFORM_P ")";
+#endif
extern const char* yaccver;
extern const char* lexver;
#ifdef __MINGW32__
#include <fileapi.h>
#else
+#ifndef NO_UNISTD
#include <unistd.h>
#endif
+#endif
char* __dw_strdup(const char* a) {
char* str = malloc(strlen(a) + 1);
fseek(db->fp, 0, SEEK_SET);
#if defined(__WATCOMC__)
+#elif defined(__VBCC__)
+
#elif defined(__MINGW32__)
OVERLAPPED overlap = {0};
LockFileEx(db->fp, LOCKFILE_EXCLUSIVE_LOCK, 0, MAXDWORD, MAXDWORD, &overlap);
fflush(db->fp);
#if defined(__WATCOMC__)
+#elif defined(__VBCC__)
+
#elif defined(__MINGW32__)
OVERLAPPED overlap = {0};
UnlockFileEx(db->fp, 0, MAXDWORD, MAXDWORD, &overlap);
--- /dev/null
+# $Id$
+
+VBCC_PLATFORM=kick13
+include Makefiles/Platforms/vbcc.mk
+LIBS = -lmsoft
+EXEC_SUFFIX=
+RCLI=
+SERVER=
+SERVER_MODULE = hayes.o
+RCLI_MODULE = hayes.o
+CFLAGS += -DAMIGA
--- /dev/null
+# $Id$
+
+# THIS IS A TEMPLATE
+
+CC = vc
+SHCC = true
+AR = vlink
+AR_ARGS = -r -o \$$@
+RANLIB = true
+STDC99 = -c99
+PIC =
+LIB_PREFIX =
+LIB_SUFFIX = .dll
+EXEC_SUFFIX = .$(VBCC_PLATFORM)
+STATICLIB_PREFIX =
+STATICLIB_SUFFIX = .a
+PLATFORM_M = $(VBCC_PLATFORM)
+PLATFORM_P = $(VBCC_PLATFORM)
+CFLAGS += +$(VBCC_PLATFORM) -DNO_STRDUP -DNO_UNISTD -Doff_t=int64_t
+DFLAGS += +$(VBCC_PLATFORM) -DNO_STRDUP -DNO_UNISTD -Doff_t=int64_t
+LDFLAGS += +$(VBCC_PLATFORM)
# $Id$
+# THIS IS A TEMPLATE
+
CC = owcc
SHCC = true
AR = wlib
AR_ARGS = rcs \$$@
RANLIB = ranlib
WINDRES = windres
-CFLAGS = -g -std=c99 -D_DEFAULT_SOURCE $(DEBUGFLAGS)
+STDC99 = -std=c99
+CFLAGS = -g $(STDC99) -D_DEFAULT_SOURCE $(DEBUGFLAGS)
LDFLAGS = -L`pwd`/Library $(MORE_LDFLAGS)
YFLAGS = -d -t -y
-LFLAGS =
+LFLAGS = --nounistd
LIBS =
+PIC = -fPIC
LIB_PREFIX = lib
LIB_SUFFIX = .so
STATICLIB_PREFIX = lib
MD5SUM = md5sum
VERSION = `cat Library/dataworks.c | grep " dataworks_version " | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+)?'`
-COMPILE_FLAGS = CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" LIB_PREFIX="$(LIB_PREFIX)" LIB_SUFFIX="$(LIB_SUFFIX)" EXEC_SUFFIX="$(EXEC_SUFFIX)" PLATFORM_M="$(PLATFORM_M)" PLATFORM_P="$(PLATFORM_P)" STATICLIB_PREFIX="$(STATICLIB_PREFIX)" STATICLIB_SUFFIX="$(STATICLIB_SUFFIX)" AR="$(AR)" RANLIB="$(RANLIB)" SHCC="$(SHCC)" LINK_LIB="$(LINK_LIB)" AR_ARGS="$(AR_ARGS)" WINDRES="$(WINDRES)" YACC="$(YACC)" LEX="$(LEX)" LFLAGS="$(LFLAGS)" YFLAGS="$(YFLAGS)" SERVER_MODULE="$(SERVER_MODULE)" SERVLINK_LIB="$(SERVLINK_LIB)" RCLI_MODULE="$(RCLI_MODULE)" RCLILINK_LIB="$(RCLILINK_LIB)" INDEP="$(INDEP)" INDEP_TO="$(INDEP_TO)"
+COMPILE_FLAGS = CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" LIB_PREFIX="$(LIB_PREFIX)" LIB_SUFFIX="$(LIB_SUFFIX)" EXEC_SUFFIX="$(EXEC_SUFFIX)" PLATFORM_M="$(PLATFORM_M)" PLATFORM_P="$(PLATFORM_P)" STATICLIB_PREFIX="$(STATICLIB_PREFIX)" STATICLIB_SUFFIX="$(STATICLIB_SUFFIX)" AR="$(AR)" RANLIB="$(RANLIB)" SHCC="$(SHCC)" LINK_LIB="$(LINK_LIB)" AR_ARGS="$(AR_ARGS)" WINDRES="$(WINDRES)" YACC="$(YACC)" LEX="$(LEX)" LFLAGS="$(LFLAGS)" YFLAGS="$(YFLAGS)" SERVER_MODULE="$(SERVER_MODULE)" SERVLINK_LIB="$(SERVLINK_LIB)" RCLI_MODULE="$(RCLI_MODULE)" RCLILINK_LIB="$(RCLILINK_LIB)" INDEP="$(INDEP)" INDEP_TO="$(INDEP_TO)" PIC="$(PIC)"