summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXANTRONIX Development2022-01-02 16:37:15 -0500
committerXANTRONIX Development2022-01-02 16:37:15 -0500
commitc89de2271389dffcf30c79c24dfe0f965b4e504f (patch)
tree43bfad32ffff2ba60e8fb20d35479095aca5d8f5 /src
parentb39a63d4d49819bc4e94e82515539e53369f4196 (diff)
downloadxas-c89de2271389dffcf30c79c24dfe0f965b4e504f.tar.gz
xas-c89de2271389dffcf30c79c24dfe0f965b4e504f.tar.bz2
xas-c89de2271389dffcf30c79c24dfe0f965b4e504f.zip
Initial implementation of configure, Makefiles
Diffstat (limited to 'src')
-rw-r--r--src/Makefile49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
new file mode 100644
index 0000000..c00ccc0
--- /dev/null
+++ b/src/Makefile
@@ -0,0 +1,49 @@
+include ../mk/build.mk
+
+INCLUDE_PATH = ../include
+HEADERS_SUBDIR = xas
+
+CC = $(CROSS)cc
+CFLAGS += -I$(INCLUDE_PATH)
+LDFLAGS +=
+
+HEADERS = riff.h audio.h
+
+OBJS = riff.o
+
+VERSION_MAJOR = 0
+VERSION_MINOR = 0.1
+VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
+
+LIBNAME = xas
+
+HEADERS_BUILD = $(addprefix $(INCLUDE_PATH)/$(HEADERS_SUBDIR)/, $(HEADERS))
+
+all: $(STATIC) $(SONAME_FULL) $(SONAME) $(SONAME_SHORT)
+
+$(STATIC): $(OBJS)
+ $(AR) rc $(STATIC) $(OBJS)
+ $(RANLIB) $(STATIC)
+
+$(SONAME_FULL): $(OBJS)
+ $(CC) $(LDFLAGS_SO) -o $(SONAME_FULL) $(OBJS) $(LDFLAGS)
+
+$(SONAME): $(SONAME_FULL)
+ $(LN) -s $< $@
+
+$(SONAME_SHORT): $(SONAME_FULL)
+ $(LN) -s $< $@
+
+$(OBJS): %.o: %.c $(HEADERS_BUILD)
+ $(CC) $(CFLAGS) -c $<
+
+install: $(SONAME_FULL) $(STATIC)
+ $(INSTALL) -c -m 0644 $(STATIC) $(PREFIX)/lib
+ $(INSTALL) -c -m 0755 $(SONAME_FULL) $(PREFIX)/lib
+ $(LN) -s -f $(SONAME_FULL) $(PREFIX)/lib/$(SONAME)
+ $(LN) -s -f $(SONAME_FULL) $(PREFIX)/lib/$(SONAME_SHORT)
+ $(INSTALL) -d -m 0755 $(PREFIX)/include/$(HEADERS_SUBDIR)
+ $(INSTALL) -c -m 0644 $(HEADERS_BUILD) $(PREFIX)/include/$(HEADERS_SUBDIR)
+
+clean:
+ $(RM) -f $(SONAME_SHORT) $(SONAME) $(SONAME_FULL) $(STATIC) $(OBJS)