From 52d60ddf8ef31cdfa2c014e24733cd9bf8333564 Mon Sep 17 00:00:00 2001 From: midipix Date: Sat, 28 Nov 2015 05:08:48 -0500 Subject: initial commit. --- project/arch.mk | 0 project/common.mk | 4 ++++ project/defs.mk | 31 +++++++++++++++++++++++++++++++ project/depends.mk | 0 project/extras.mk | 27 +++++++++++++++++++++++++++ project/headers.mk | 8 ++++++++ project/overrides.mk | 0 project/tree.mk | 3 +++ 8 files changed, 73 insertions(+) create mode 100644 project/arch.mk create mode 100644 project/common.mk create mode 100644 project/defs.mk create mode 100644 project/depends.mk create mode 100644 project/extras.mk create mode 100644 project/headers.mk create mode 100644 project/overrides.mk create mode 100644 project/tree.mk (limited to 'project') diff --git a/project/arch.mk b/project/arch.mk new file mode 100644 index 0000000..e69de29 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 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 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 -- cgit v1.2.3