diff options
author | Taylor Holberton <taylorcholberton@gmail.com> | 2016-10-01 13:08:08 -0400 |
---|---|---|
committer | Taylor Holberton <taylorcholberton@gmail.com> | 2016-10-01 13:08:08 -0400 |
commit | 22ab7da256ceea13963f9383e065d2ef8bfb8f5d (patch) | |
tree | 369dc4e0430e4c602a731568511f66b5f82ae4d9 /Makefile | |
parent | 626a822af99650a68e668fe8af3f06850866106f (diff) |
put source files into src dir
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 29 |
1 files changed, 5 insertions, 24 deletions
@@ -1,44 +1,25 @@ export TOPDIR = $(shell pwd) -export SRCDIR = $(TOPDIR) +export SRCDIR = $(TOPDIR)/src export INCDIR = $(TOPDIR)/include export DESTDIR ?= export PREFIX ?= /usr/local export CROSS_COMPILE = -CC = $(CROSS_COMPILE)gcc -CFLAGS = -Wall -Wextra -Werror -Wfatal-errors -I $(INCDIR) - -LD = $(CROSS_COMPILE)ld -LDFLAGS = - -OBJECTS = mixer.o pcm.o -LIB = libtinyalsa.a -SHLIB = libtinyalsa.so - .PHONY: all -all: $(LIB) $(SHLIB) +all: + $(MAKE) -C src $(MAKE) -C utils -$(SHLIB): $(OBJECTS) - $(CC) $(LDFLAGS) -shared $(OBJECTS) -o $(SHLIB) - -$(LIB): $(OBJECTS) - $(CROSS_COMPILE)$(AR) rcs $@ $^ - -%.o: %.c - $(CROSS_COMPILE)$(CC) $(CFLAGS) -fPIC -c $^ -o $@ - .PHONY: clean clean: - -rm $(LIB) $(SHLIB) $(OBJECTS) + $(MAKE) -C src clean $(MAKE) -C utils clean .PHONY: install install: $(LIB) $(SHLIB) - cp -u $(SHLIB) $(PREFIX)/lib/ - cp -u $(LIB) $(PREFIX)/lib/ mkdir -p $(PREFIX)/include/tinyalsa cp -Ru $(INCDIR)/tinyalsa $(PREFIX)/include/ + $(MAKE) -C src install $(MAKE) -C utils install |