1 /* Wrapper to make installation easier with cross-compiling.
3 * Copyright 2006 Rob Landley <rob@landley.net>
7 #include "generated/config.h"
8 #include "lib/toyflags.h"
10 #define NEWTOY(name, opts, flags) {#name, flags},
11 #define OLDTOY(name, oldname, flags) {#name, flags},
13 // Populate toy_list[].
15 struct {char *name; int flags;} toy_list[] = {
16 #include "generated/newtoys.h"
19 int main(int argc, char *argv[])
21 static char *toy_paths[]={"usr/","bin/","sbin/",0};
24 // Output list of applets.
25 for (i=1; i<sizeof(toy_list)/sizeof(*toy_list); i++) {
26 int fl = toy_list[i].flags;
27 if (fl & TOYMASK_LOCATION) {
30 for (j=0; toy_paths[j]; j++)
31 if (fl & (1<<j)) len += printf("%s", toy_paths[j]);
33 len += printf("%s\n",toy_list[i].name);