summaryrefslogtreecommitdiff
path: root/apps/codecs/libgme/nsf/libnsf.make
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libgme/nsf/libnsf.make')
-rw-r--r--apps/codecs/libgme/nsf/libnsf.make21
1 files changed, 21 insertions, 0 deletions
diff --git a/apps/codecs/libgme/nsf/libnsf.make b/apps/codecs/libgme/nsf/libnsf.make
new file mode 100644
index 0000000000..644aa7408c
--- /dev/null
+++ b/apps/codecs/libgme/nsf/libnsf.make
@@ -0,0 +1,21 @@
+
+# libnsf
+NSFLIB := $(CODECDIR)/libnsf.a
+NSFLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libgme/nsf/NSFSOURCES)
+NSFLIB_OBJ := $(call c2obj, $(NSFLIB_SRC))
+OTHER_SRC += $(NSFLIB_SRC)
+
+$(NSFLIB): $(NSFLIB_OBJ)
+ $(SILENT)$(shell rm -f $@)
+ $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null
+
+NSFFLAGS = $(filter-out -O%,$(CODECFLAGS)) -fno-strict-aliasing -DGME_NSF_TYPE
+ifeq ($(CPU),arm)
+ NSFFLAGS += -O1
+else
+ NSFFLAGS += -O2
+endif
+
+$(CODECDIR)/libgme/nsf/%.o: $(ROOTDIR)/apps/codecs/libgme/%.c
+ $(SILENT)mkdir -p $(dir $@)
+ $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(NSFFLAGS) -c $< -o $@