summaryrefslogtreecommitdiffhomepage
path: root/project
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2015-11-28 05:08:48 -0500
committermidipix <writeonce@midipix.org>2015-11-28 05:30:31 -0500
commit52d60ddf8ef31cdfa2c014e24733cd9bf8333564 (patch)
tree22874d286222b389b3123a4665680b771e8c4765 /project
parent742443424b7fd3f972e72e6bc4e9ca39d344abcb (diff)
downloadntcon-52d60ddf8ef31cdfa2c014e24733cd9bf8333564.tar.bz2
ntcon-52d60ddf8ef31cdfa2c014e24733cd9bf8333564.tar.xz
initial commit.
Diffstat (limited to 'project')
-rw-r--r--project/arch.mk0
-rw-r--r--project/common.mk4
-rw-r--r--project/defs.mk31
-rw-r--r--project/depends.mk0
-rw-r--r--project/extras.mk27
-rw-r--r--project/headers.mk8
-rw-r--r--project/overrides.mk0
-rw-r--r--project/tree.mk3
8 files changed, 73 insertions, 0 deletions
diff --git a/project/arch.mk b/project/arch.mk
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/project/arch.mk
diff --git a/project/common.mk b/project/common.mk
new file mode 100644
index 0000000..8b8af72
--- /dev/null
+++ b/project/common.mk
@@ -0,0 +1,4 @@
+COMMON_SRCS = \
+ src/ntcon.c \
+ src/ntcon_entry_point.c \
+
diff --git a/project/defs.mk b/project/defs.mk
new file mode 100644
index 0000000..d6212fe
--- /dev/null
+++ b/project/defs.mk
@@ -0,0 +1,31 @@
+SHARED_LIB_DEPS =
+SHARED_APP_DEPS =
+STATIC_APP_DEPS =
+
+COMMON_LOBJS = $(COMMON_SRCS:.c=.lo)
+COMMON_OBJS = $(COMMON_SRCS:.c=.o)
+
+ARCH_LOBJS = $(ARCH_SRCS:.c=.lo)
+ARCH_OBJS = $(ARCH_SRCS:.c=.o)
+
+SHARED_OBJS = $(COMMON_LOBJS) $(ARCH_LOBJS)
+STATIC_OBJS = $(COMMON_OBJS) $(ARCH_OBJS)
+
+SHARED_LIB = $(LIBDIR)/$(OS_LIB_PREFIX)$(PACKAGE)$(OS_LIB_SUFFIX)
+STATIC_LIB = $(LIBDIR)/$(OS_LIB_PREFIX)$(PACKAGE)$(OS_ARCHIVE_EXT)
+SHARED_IMPLIB = $(LIBDIR)/$(OS_LIB_PREFIX)$(PACKAGE)$(OS_IMPLIB_EXT)
+
+CFLAGS = $(CFLAGS_DEBUG) $(CFLAGS_CONFIG) $(CFLAGS_SYSROOT) \
+ $(CFLAGS_COMMON) $(CFLAGS_CMDLINE) $(CFLAGS_HOST) \
+ $(CFLAGS_PATH)
+
+CFLAGS_SHARED = $(CFLAGS) $(CFLAGS_PIC) $(CFLAGS_SHARED_ATTR)
+CFLAGS_STATIC = $(CFLAGS) $(CFLAGS_OBJ) $(CFLAGS_STATIC_ATTR)
+
+LDFLAGS_SHARED = $(LDFLAGS_DEBUG) $(LDFLAGS_CONFIG) $(LDFLAGS_SYSROOT) \
+ $(LDFLAGS_COMMON) $(LDFLAGS_CMDLINE) $(LDFLAGS_HOST) \
+ $(LDFLAGS_PATH) $(SHARED_LIB_DEPS) $(LDFLAGS_LAST)
+
+LDFLAGS_STATIC = $(LDFLAGS_DEBUG) $(LDFLAGS_CONFIG) $(LDFLAGS_SYSROOT) \
+ $(LDFLAGS_COMMON) $(LDFLAGS_CMDLINE) $(LDFLAGS_HOST) \
+ $(LDFLAGS_PATH) $(STATIC_APP_DEPS) $(LDFLAGS_LAST)
diff --git a/project/depends.mk b/project/depends.mk
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/project/depends.mk
diff --git a/project/extras.mk b/project/extras.mk
new file mode 100644
index 0000000..57b0f11
--- /dev/null
+++ b/project/extras.mk
@@ -0,0 +1,27 @@
+CFLAGS_SHARED_ATTR += -DNTCON_BUILD
+CFLAGS_STATIC_ATTR += -DNTCON_STATIC
+
+ifeq ($(OS),midipix)
+ HOST_FMT = pe
+else ifeq ($(OS),mingw)
+ HOST_FMT = pe
+else
+ HOST_FMT = unknown
+endif
+
+ifeq ($(HOST_FMT),pe)
+ CFLAGS_CONFIG += -DMIDIPIX_FREESTANDING -ffreestanding -D__NT$(HOST_BITS)
+ CFLAGS_CONFIG += -UWIN32 -U_WIN32 -U__WIN32 -U__WIN32__
+ CFLAGS_CONFIG += -UWIN64 -U_WIN64 -U__WIN64 -U__WIN64__
+
+ LDFLAGS_SHARED += -nostdlib
+ LDFLAGS_SHARED += -lpemagine
+ LDFLAGS_SHARED += -Wl,--out-implib,$(SHARED_IMPLIB)
+ LDFLAGS_SHARED += -Wl,--exclude-all-symbols
+
+ ifeq ($(HOST_BITS),32)
+ LDFLAGS_SHARED += -Wl,--entry,$(HOST_UNDERSCORE)ntcon_entry_point@12
+ else
+ LDFLAGS_SHARED += -Wl,--entry,$(HOST_UNDERSCORE)ntcon_entry_point
+ endif
+endif
diff --git a/project/headers.mk b/project/headers.mk
new file mode 100644
index 0000000..cddbaf1
--- /dev/null
+++ b/project/headers.mk
@@ -0,0 +1,8 @@
+API_HEADERS = \
+ $(PROJECT_DIR)/include/$(PACKAGE)/ntcon.h \
+ $(PROJECT_DIR)/include/$(PACKAGE)/ntcon_api.h \
+ $(PROJECT_DIR)/include/$(PACKAGE)/ntcon_env.h
+
+INTERNAL_HEADERS =
+
+ALL_HEADERS = $(API_HEADERS) $(INTERNAL_HEADERS)
diff --git a/project/overrides.mk b/project/overrides.mk
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/project/overrides.mk
diff --git a/project/tree.mk b/project/tree.mk
new file mode 100644
index 0000000..20f0861
--- /dev/null
+++ b/project/tree.mk
@@ -0,0 +1,3 @@
+tree.tag:
+ mkdir -p src
+ touch tree.tag