Skip to content

Looking for a way to generate multiple bins in a directory #1

@nichelnich

Description

@nichelnich

Thanks for your work, this is the basis of my work below.

forked repo is here .Use kbuild for muti application project, bins & shared librarays.

  1. Change the arch dir to custom. use arch architecture for customized.

  2. For good management(add or delete app), I created the mks folder to store the generated build files for each application.

## top Makefile
include $(srctree)/mks/*.mk
## mks/client.mk  for client app
######
all:  app_client

client-y        := client custom/common/ui

client-dirs := $(client-y)
client-objs := $(patsubst %,%/built-in.o, $(client-y))
client-all  := $(client-objs)

quiet_cmd_client = LD      $@
cmd_client = $(CC) $(LDFLAGS) -o $@                          \
             -Wl,--start-group $(client-objs) -Wl,--end-group

app_client: $(client-all) FORCE
	+$(call if_changed,client)

$(sort $(client-all)): $(client-dirs) ;

PHONY += $(client-dirs)
$(client-dirs): prepare scripts
	$(Q)$(MAKE) $(build)=$@

CLEAN_FILES += app_client

clean-dirs      += $(addprefix _clean_, $(client-dirs))
##########
  1. I met a problem when build for cgis, I designed the cgi makefile as follows. it create multiple bins in a same directory, i copy Makefile.build to Makefile.cgi, how modify Makefile.cgi for create multiple cgis in a same directory?
    I am looking for your help, I hope to get your advice.
get.cgi-y := get.o lib.o
cgi-target += get.cgi

set.cgi-y := set.o lib.o
set.cgi-CGI_VPN += vpn.o
cgi-target += set.cgi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions