From fa897aef9891212c388a333d9ac5bb8ccf3f4cb9 Mon Sep 17 00:00:00 2001 From: midipix Date: Thu, 24 Sep 2015 23:49:09 -0400 Subject: makefile replacement: step 2/2: use the midipix build template. --- project/arch.mk | 0 project/common.mk | 6 ++++++ project/defs.mk | 31 +++++++++++++++++++++++++++++++ project/depends.mk | 0 project/extras.mk | 2 ++ project/headers.mk | 9 +++++++++ project/overrides.mk | 0 project/tree.mk | 3 +++ 8 files changed, 51 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..014d45f --- /dev/null +++ b/project/common.mk @@ -0,0 +1,6 @@ +COMMON_SRCS = \ + src/dalist.c \ + src/dalist_debug.c \ + src/dalist_lib_entry_point.c \ + src/dalist_memfn.c \ + diff --git a/project/defs.mk b/project/defs.mk new file mode 100644 index 0000000..1f352be --- /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..bece2fc --- /dev/null +++ b/project/extras.mk @@ -0,0 +1,2 @@ +CFLAGS_SHARED_ATTR += -DDALIST_BUILD +CFLAGS_STATIC_ATTR += -DDALIST_STATIC diff --git a/project/headers.mk b/project/headers.mk new file mode 100644 index 0000000..2131cc7 --- /dev/null +++ b/project/headers.mk @@ -0,0 +1,9 @@ +API_HEADERS = \ + $(PROJECT_DIR)/include/$(PACKAGE)/dalist.h \ + $(PROJECT_DIR)/include/$(PACKAGE)/dalist_api.h \ + $(PROJECT_DIR)/include/$(PACKAGE)/dalist_env.h + +INTERNAL_HEADERS = \ + $(PROJECT_DIR)/src/$(PACKAGE)_impl.h + +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