diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-01-13 22:40:51 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-01-19 14:23:00 +1000 |
commit | eb0f35923fb4119800c19f9843e7e4125804ee24 (patch) | |
tree | 9908bdf7643678b9936e247f668cf66471d4d6a4 /bin | |
parent | 6ee2fc67c942941c74f594078cdb6f04f8512dbe (diff) | |
download | nouveau-eb0f35923fb4119800c19f9843e7e4125804ee24.tar.gz |
drm: remove symlinks from build, use Kbuild files for lib build
The DRM build used a separate, symlinked, source tree out of a desire
to avoid Kbuild/autotools' object files conflicting.
Not only is this very annoying to maintain, but it's made worse by
having two entirely separate source file lists to maintain too.
Fixes both these issues by ditching automake (it doesn't approve of
the kernel's Kbuild syntax) in favour of custom makefiles that can
build libnvif.so from the Kbuild files.
Like the previous commit, this will never show up in the kernel tree
(it has its own version).
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'bin')
-rw-r--r-- | bin/.gitignore | 5 | ||||
-rw-r--r-- | bin/Makefile | 12 | ||||
-rw-r--r-- | bin/Makefile.am | 13 |
3 files changed, 17 insertions, 13 deletions
diff --git a/bin/.gitignore b/bin/.gitignore new file mode 100644 index 000000000..f59c0c66d --- /dev/null +++ b/bin/.gitignore @@ -0,0 +1,5 @@ +*.d +*.o +nv_* +!nv_*.c +!nv_*.h diff --git a/bin/Makefile b/bin/Makefile new file mode 100644 index 000000000..f64b3b839 --- /dev/null +++ b/bin/Makefile @@ -0,0 +1,12 @@ +BINNVIF_CC = $(CFLAGS) +BINNVIF_LD = $(LDFLAGS) -lnvif -lncurses -lmenu -lform -L$(lib) + +srcs = $(wildcard $(bin)/*.c) +outp = $(srcs:.c=) + +$(outp): %: %.c $(lib)/libnvif.so + @echo -e " CCLD $@" + @$(CC) $(BINNVIF_CC) $(BINNVIF_LD) -MMD -MP -o $@ $< + +deps += $(srcs:.c=.d) +bins += $(outp) diff --git a/bin/Makefile.am b/bin/Makefile.am deleted file mode 100644 index 13f75fd5e..000000000 --- a/bin/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -bin_PROGRAMS = \ - nv_rd08 nv_rd16 nv_rd32 nv_wr08 nv_wr16 nv_wr32 \ - nv_rf08 nv_rf16 nv_rf32 nv_wf08 nv_wf16 nv_wf32 \ - nv_ri08 nv_ri16 nv_ri32 nv_wi08 nv_wi16 nv_wi32 \ - nv_rv08 nv_rv16 nv_rv32 nv_wv08 nv_wv16 nv_wv32 \ - nv_rs08 nv_rs16 nv_rs32 nv_ws08 nv_ws16 nv_ws32 \ - nv_disp nv_i2c nv_aux nv_init nv_rdfuc nv_perfmon - -AM_CPPFLAGS = -I$(top_srcdir)/nvkm/include \ - -I$(top_srcdir)/lib/ \ - -I$(top_srcdir)/ - -LDFLAGS = $(top_srcdir)/nvif/libnvif.la -lncurses -lmenu -lform |