Add test program to test args

This commit is contained in:
Baptiste Wicht 2014-02-11 20:34:58 +01:00
parent 1a1ad35a8a
commit 21c892b287
5 changed files with 37 additions and 1 deletions

View File

@ -38,7 +38,10 @@ reboot: force_look tlib/libtlib.a
shutdown: force_look tlib/libtlib.a
cd shutdown; $(MAKE) shutdown
dist: one hello long loop longone longtwo keyboard tsh cpuid shutdown reboot
args: force_look tlib/libtlib.a
cd args; $(MAKE) args
dist: one hello long loop longone longtwo keyboard tsh cpuid shutdown reboot args
mkdir -p dist
cp one/a.out dist/one
cp hello/a.out dist/hello
@ -51,6 +54,7 @@ dist: one hello long loop longone longtwo keyboard tsh cpuid shutdown reboot
cp tsh/tsh dist/
cp reboot/reboot dist/
cp shutdown/shutdown dist/
cp args/args dist/
strip dist/*
force_look:
@ -66,4 +70,7 @@ clean:
cd keyboard; $(MAKE) clean
cd tsh; $(MAKE) clean
cd cpuid; $(MAKE) clean
cd reboot; $(MAKE) clean
cd shutdown; $(MAKE) clean
cd args; $(MAKE) clean
rm -rf dist

15
programs/args/Makefile Normal file
View File

@ -0,0 +1,15 @@
.PHONY: default clean
default: args
include ../../cpp.mk
%.cpp.o: src/%.cpp
$(CC) -c $< -o $@ $(PROGRAM_FLAGS)
args: main.cpp.o
$(CC) -o args main.cpp.o $(PROGRAM_LINK_FLAGS)
clean:
rm -f *.cpp.o
rm -rf args

BIN
programs/args/args Executable file

Binary file not shown.

BIN
programs/args/reboot Executable file

Binary file not shown.

View File

@ -0,0 +1,14 @@
//=======================================================================
// Copyright Baptiste Wicht 2013-2014.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//=======================================================================
#include <print.hpp>
#include <system.hpp>
int main(int argc, char* argv[]){
print_line(argc);
exit(0);
}