Search for question
Question

01 Assignments > Make Make Due No Due Date Points 100 Submitting an external tool Make The goal of this project is to demonstrate you understand how make works and what a "source" file is. Create a tool to generate a C program from a simple text file like the one below. add multiply leftshift rightshift xor bogus + * << >> ^ ** Running your tool on the above input should produce a C program. Possibly something like the one below. int add(int a,int b). int multiply(int a, int b) int leftshift (int a,int b) int rightshift (int a, int b) int xor(int a,int b) int bogus (int a,int b) { return a + b; } { return a * b; } { return a << b; } { return a >> b; } return a ^ b; } { return a ** b; } Obviously, your tool should support any string which can be used as a function identifier and any C operator. However, you are not required to verify either of these are actually valid or work as expected. For example, the bogus function above is not valid C code. Your tool must also generate an appropriate "header" for the functions generated to support multi-module development. You may use any language available on the tool server (for example: C, C++, Python, bash, PHP, etc.). Second, create a Makefile to build at least two different multi-module applications using your tool. The demonstrations need not be ingenious or cleaver, they merely need to show the use of your tool in action and how to create multi-module programs using it. Your Makefile should demonstrate the following features: • make all should build everything • make clean should delete all non-source files • make cuhmi+ should produce an appropriate zin file Some Rubric Criteria Ratings Pts Make Due No Due Date Points 100 Submitting an external tool int rightshift(int a,int b) { return a >> b; } int xor(int a, int b) int bogus (int a,int b) { return a b; } { return a ** b; } ^ Obviously, your tool should support any string which can be used as a function identifier and any C operator. However, you are not required to verify either of these are actually valid or work as expected. For example, the bogus function above is not valid C code. Your tool must also generate an appropriate "header" for the functions generated to support multi-module development. You may use any language available on the tool server (for example: C, C++, Python, bash, PHP, etc.). Second, create a Makefile to build at least two different multi-module applications using your tool. The demonstrations need not be ingenious or cleaver, they merely need to show the use of your tool in action and how to create multi-module programs using it. Your Makefile should demonstrate the following features: • make all should build everything • make clean should delete all non-source files • make submit should produce an appropriate .zip file ⚫ other targets: your tool, each demo program, each module, etc. ⚫ each build step should only be executed if absolutely necessary ⚫ build steps and compile options should not be repeated • modifying any file, including intermediate "object" files or headers, should always perform the minimum operations required to bring the target up to date Submit a .zip file created using zip -9qjx. It should include only source files and the Makefile. Submit Source: Choose File No file chosen Submit View problem in a new window