mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-14 15:06:52 -04:00
Add test program to test args
This commit is contained in:
parent
1a1ad35a8a
commit
21c892b287
@ -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
15
programs/args/Makefile
Normal 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
BIN
programs/args/args
Executable file
Binary file not shown.
BIN
programs/args/reboot
Executable file
BIN
programs/args/reboot
Executable file
Binary file not shown.
14
programs/args/src/main.cpp
Normal file
14
programs/args/src/main.cpp
Normal 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);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user