Change test app to C++ for better check on naming

This commit is contained in:
Brendan Hansknecht 2021-08-19 22:59:40 -07:00
parent 97997acffa
commit d54dca73b4
5 changed files with 17 additions and 17 deletions

View file

@ -1,10 +1,10 @@
all: platform
platform: platform.c libapp.so
$(CC) -O2 -fPIC -fPIE -o $@ $^
platform: platform.cc libapp.so
$(CXX) -O2 -fPIC -fPIE -o $@ $^
libapp.so: app.c
$(CC) -O2 -fPIC -shared -o $@ $^
libapp.so: app.cc
$(CXX) -O2 -fPIC -shared -o $@ $^
clean:
rm -f platform libapp.so
rm -f platform libapp.so

View file

@ -1,3 +0,0 @@
#include <stdio.h>
void app() { printf("Hello World from the application"); }

3
linker/tests/app.cc Normal file
View file

@ -0,0 +1,3 @@
#include <iostream>
void app() { std::cout << "Hello World from the application" << std::endl; }

View file

@ -1,9 +0,0 @@
#include <stdio.h>
void app();
int main() {
printf("Hello World from the platform");
app();
return 0;
}

9
linker/tests/platform.cc Normal file
View file

@ -0,0 +1,9 @@
#include <iostream>
void app();
int main() {
std::cout << "Hello World from the platform\n";
app();
return 0;
}