LIB_PREFIX = lib
LIB_SUFFIX = .so
EXEC_SUFFIX =
+PLATFORM_M = `uname -m`
+PLATFORM_P = `uname -p`
ifneq ("$(PLATFORM)", "")
include Platforms/$(PLATFORM).mk
endif
-COMPILE_FLAGS = CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" LIB_PREFIX="$(LIB_PREFIX)" LIB_SUFFIX="$(LIB_SUFFIX)" EXEC_SUFFIX="$(EXEC_SUFFIX)"
+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)"
.PHONY: all no-doc replace format clean ./Library ./Client ./Document
$(CC) -shared $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
.c.o:
- $(CC) $(CFLAGS) -fPIC -c -o $@ $<
+ $(CC) $(CFLAGS) -DPLATFORM_M=\"$(PLATFORM_M)\" -DPLATFORM_P=\"$(PLATFORM_P)\" -fPIC -c -o $@ $<
clean:
rm -f *.o *.so *.dll
const char* dataworks_compile_date = __DATE__;
#if defined(__MINGW32__)
-const char* dataworks_platform = "Windows";
+const char* dataworks_platform = "Windows/"
#elif defined(__NetBSD__)
-const char* dataworks_platform = "NetBSD";
+const char* dataworks_platform = "NetBSD/"
#elif defined(__linux__)
-const char* dataworks_platform = "Linux";
+const char* dataworks_platform = "Linux/"
#else
-const char* dataworks_platform = "Unknown";
+const char* dataworks_platform = "Unknown/"
#endif
+PLATFORM_M " (" PLATFORM_P ")";
const char* dataworks_get_version(void) { return dataworks_version; }
const char* dataworks_get_compile_date(void) { return dataworks_compile_date; }
LIB_PREFIX = lib
LIB_SUFFIX = .so
EXEC_SUFFIX =
+PLATFORM_M = `uname -m`
+PLATFORM_P = `uname -p`
.if "$(PLATFORM)" != ""
.include Platforms/$(PLATFORM).mk
.endif
-COMPILE_FLAGS = CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" LIB_PREFIX="$(LIB_PREFIX)" LIB_SUFFIX="$(LIB_SUFFIX)" EXEC_SUFFIX="$(EXEC_SUFFIX)"
+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)"
.PHONY: all no-doc replace format clean ./Library ./Client ./Document