diff options
Diffstat (limited to 'project')
-rw-r--r-- | project/defs.mk | 24 | ||||
-rw-r--r-- | project/extras.mk | 35 | ||||
-rw-r--r-- | project/overrides.mk | 6 |
3 files changed, 30 insertions, 35 deletions
diff --git a/project/defs.mk b/project/defs.mk index d6212fe..1f352be 100644 --- a/project/defs.mk +++ b/project/defs.mk @@ -2,25 +2,25 @@ SHARED_LIB_DEPS = SHARED_APP_DEPS = STATIC_APP_DEPS = -COMMON_LOBJS = $(COMMON_SRCS:.c=.lo) -COMMON_OBJS = $(COMMON_SRCS:.c=.o) +COMMON_LOBJS = $(COMMON_SRCS:.c=.lo) +COMMON_OBJS = $(COMMON_SRCS:.c=.o) -ARCH_LOBJS = $(ARCH_SRCS:.c=.lo) -ARCH_OBJS = $(ARCH_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_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) +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_COMMON) $(CFLAGS_CMDLINE) $(CFLAGS_HOST) \ $(CFLAGS_PATH) -CFLAGS_SHARED = $(CFLAGS) $(CFLAGS_PIC) $(CFLAGS_SHARED_ATTR) -CFLAGS_STATIC = $(CFLAGS) $(CFLAGS_OBJ) $(CFLAGS_STATIC_ATTR) +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) \ diff --git a/project/extras.mk b/project/extras.mk index 57b0f11..e319e4e 100644 --- a/project/extras.mk +++ b/project/extras.mk @@ -1,27 +1,16 @@ -CFLAGS_SHARED_ATTR += -DNTCON_BUILD -CFLAGS_STATIC_ATTR += -DNTCON_STATIC +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 +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__ -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 += --out-implib $(SHARED_IMPLIB) +LDFLAGS_SHARED += --exclude-all-symbols +LDFLAGS_SHARED += -lpemagine - 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 +ifeq ($(HOST_BITS),32) + LDFLAGS_SHARED += --entry $(HOST_UNDERSCORE)ntcon_entry_point@12 +else + LDFLAGS_SHARED += --entry $(HOST_UNDERSCORE)ntcon_entry_point endif diff --git a/project/overrides.mk b/project/overrides.mk index e69de29..2a67ff9 100644 --- a/project/overrides.mk +++ b/project/overrides.mk @@ -0,0 +1,6 @@ +# direct linker invocation +LDFLAGS_SYSROOT = $(CFLAGS_SYSROOT) + +ifneq ($(PE_SUBSYSTEM)x,x) + LDFLAGS_COMMON += --subsystem=$(PE_SUBSYSTEM) +endif |