mirror of
https://github.com/DigitalDevices/dddvb.git
synced 2025-03-01 10:35:23 +00:00
Factorize Makefiles rules
This commit is contained in:
parent
f570b2e071
commit
8e25b218ad
@ -1,20 +1,14 @@
|
||||
all: cit citin flashprog modt ddtest setmod ddflash setmod2 pls setmod3
|
||||
PTHREAD_BINS=cit modt
|
||||
INCLUDE_BINS=setmod setmod2 setmod3
|
||||
STANDARD_BINS=flashprog ddtest ddflash pls
|
||||
|
||||
cit: cit.c
|
||||
$(CC) -o cit cit.c -lpthread
|
||||
all: $(PTHREAD_BINS) $(INCLUDE_BINS) $(STANDARD_BINS)
|
||||
|
||||
modt: modt.c
|
||||
$(CC) -o modt modt.c -lpthread
|
||||
$(PTHREAD_BINS): %: %.c
|
||||
gcc -o $@ $< -lpthread
|
||||
|
||||
setmod: setmod.c
|
||||
$(CC) -o setmod setmod.c -I../include/
|
||||
|
||||
setmod2: setmod2.c
|
||||
$(CC) -o setmod2 setmod2.c -I../include/
|
||||
|
||||
setmod3: setmod3.c
|
||||
$(CC) -o setmod3 setmod3.c -I../include/
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -o $@ $<
|
||||
$(STANDARD_BINS): %: %.c
|
||||
gcc -o $@ $<
|
||||
|
||||
$(INCLUDE_BINS): %: %.c
|
||||
gcc -o $@ $< -I../include
|
||||
|
@ -1,20 +1,9 @@
|
||||
all: ddtest octonet octokey ddflash
|
||||
PROGS=ddtest octonet octokey ddflash
|
||||
all: $(PROGS)
|
||||
|
||||
install: all
|
||||
install -m 0755 ddtest $(DESTDIR)/usr/bin
|
||||
install -m 0755 octonet $(DESTDIR)/usr/bin
|
||||
install -m 0755 octokey $(DESTDIR)/usr/bin
|
||||
install -m 0755 ddflash $(DESTDIR)/usr/bin
|
||||
|
||||
ddflash: ddflash.c
|
||||
$(CC) -o ddflash ddflash.c
|
||||
|
||||
ddtest: ddtest.c
|
||||
$(CC) -o ddtest ddtest.c
|
||||
|
||||
octonet: octonet.c
|
||||
$(CC) -o octonet octonet.c
|
||||
|
||||
octokey: octokey.c
|
||||
$(CC) -o octokey octokey.c
|
||||
install: $(subst,$(PROGS),%,install-%)
|
||||
$(subst,$(PROGS),%,install-%): install-%: %
|
||||
install -m 0755 $< $(DESTDIR)/usr/bin
|
||||
|
||||
$(PROGS): %: %.c
|
||||
$(CC) -o $@ $<
|
||||
|
Loading…
x
Reference in New Issue
Block a user