ccx-utils

Miscellaneous utilities written in C
git clone https://ccx.te2000.cz/git/ccx-utils
Log | Files | Refs

Makefile (832B)


      1 
      2 tools_simple:=argv0exec nosuid pidns_run safelink spawn-pty fdsend fdrecv fdrecvto socketpair ptsname mtime_to_uuidv7 ucspi-socksserver ucspi-socksserver-connected
      3 
      4 tools_libcap:=applyuidgid-caps
      5 
      6 tools_libs6:=ucspi-socksserver-access
      7 
      8 tools=$(tools_simple) $(tools_libcap) $(tools_libs6)
      9 
     10 all: $(tools)
     11 .PHONY: all
     12 
     13 clean:
     14 	rm *.o $(tools)
     15 .PHONY: clean
     16 
     17 %.o: %.c ../cc
     18 	../cc -c -o '$@' '$*.c'
     19 
     20 define link_simple =
     21 $(1): $(1).o ../link
     22 	../link -o '$$@' '$(1).o'
     23 endef
     24 $(foreach var,$(tools_simple),$(eval $(call link_simple,$(var))))
     25 
     26 define link_libcap =
     27 $(1): $(1).o ../link
     28 	../link -o '$$@' '$(1).o' -lcap
     29 endef
     30 $(foreach var,$(tools_libcap),$(eval $(call link_libcap,$(var))))
     31 
     32 define link_libs6 =
     33 $(1): $(1).o ../link
     34 	../link -o '$$@' '$(1).o' -ls6
     35 endef
     36 $(foreach var,$(tools_libs6),$(eval $(call link_libs6,$(var))))
     37