summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/.gitignore5
-rw-r--r--bin/Makefile12
-rw-r--r--bin/Makefile.am13
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