Move -lutil to the end of commandline, reported by Diogo Melo
[retty.git] / Makefile
blob169a7a88d42fde315d017238b7e981707df4b8af
1 ARCH=`./getarch.sh -arch`
2 OS=`./getarch.sh -os`
3 FULLARCH=$(ARCH)-$(OS)
5 CFLAGS=-Wall -g -DARCH=$(ARCH) -DOS=$(OS)
6 LIBS=-lutil
7 EXE=blindtty retty
9 all: $(EXE)
11 blindtty: blindtty.o
12 $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
14 retty: retty.o
15 $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
17 retty.o: bc-attach.i bc-detach.i
19 bc-attach.i: attach.o
20 objdump -j .text -d $^ | ./bytecode.pl attach_code >$@
22 bc-detach.i: detach.o
23 objdump -j .text -d $^ | ./bytecode.pl detach_code >$@
25 attach.o:
26 make -f arch/Makefile attach-$(FULLARCH).o
27 mv attach-$(FULLARCH).o attach.o
29 detach.o:
30 make -f arch/Makefile detach-$(FULLARCH).o
31 mv detach-$(FULLARCH).o detach.o
33 clean:
34 rm -f *.o $(EXE) bc-attach.* bc-detach.* test arch/*.o