wok-6.x diff gen-init-cpio/stuff/Makefile @ rev 18978

Up tazlito(418)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Mar 14 14:14:36 2016 +0200 (2016-03-14)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gen-init-cpio/stuff/Makefile	Mon Mar 14 14:14:36 2016 +0200
     1.3 @@ -0,0 +1,43 @@
     1.4 +
     1.5 +DESTDIR =
     1.6 +PREFIX = /
     1.7 +
     1.8 +MKDIR = /bin/mkdir
     1.9 +INSTALL = /bin/install -c -m 755
    1.10 +
    1.11 +CC   = /usr/bin/gcc 
    1.12 +LD   = /usr/bin/gcc
    1.13 +
    1.14 +CFLAGS += -Wall -Wstrict-prototypes -Wsign-compare -Wchar-subscripts \
    1.15 +           -Wpointer-arith -Wcast-align -Wsign-compare
    1.16 +
    1.17 +#pretty print!
    1.18 +E = @echo
    1.19 +Q = @
    1.20 +
    1.21 +all: gen_init_cpio
    1.22 +.PHONY: all
    1.23 +.DEFAULT: all
    1.24 +
    1.25 +%.o: %.c
    1.26 +	$(E) "  compile " $@
    1.27 +	$(Q) $(CC) -c $(CFLAGS) $< -o $@
    1.28 +
    1.29 +gen_init_cpio: gen_init_cpio.o
    1.30 +	$(E) ">>build   " $@
    1.31 +	$(Q) $(LD) $(LDFLAGS) $@.o -o $@ $(LIB_OBJS)
    1.32 +
    1.33 +clean:
    1.34 +	$(E) "  clean   "
    1.35 +	$(Q) rm -f gen_init_cpio *.o
    1.36 +.PHONY: clean
    1.37 +
    1.38 +install: all
    1.39 +	$(MKDIR) -p $(DESTDIR)$(PREFIX)sbin/
    1.40 +	cp gen_init_cpio $(DESTDIR)$(PREFIX)sbin/
    1.41 +	chmod -R 755 ${DESTDIR}${PREFIX}sbin/
    1.42 +.PHONY: install
    1.43 +
    1.44 +uninstall:
    1.45 +	rm $(DESTDIR)$(PREFIX)sbin/gen_init_cpio
    1.46 +.PHONY: uninstall