update makefile
This commit is contained in:
parent
e597d59cb2
commit
9c299777d3
19
.SRCINFO
19
.SRCINFO
@ -1,19 +0,0 @@
|
|||||||
pkgbase = term-owo-git
|
|
||||||
pkgdesc = A simple C++ program that owofies text
|
|
||||||
pkgver = 1.0
|
|
||||||
pkgrel = 1
|
|
||||||
url = https://git.alfieking.dev/acetheking987/term-owo-cpp
|
|
||||||
arch = x86_64
|
|
||||||
arch = i686
|
|
||||||
arch = arm
|
|
||||||
arch = armv6h
|
|
||||||
arch = armv7h
|
|
||||||
arch = aarch64
|
|
||||||
license = MIT
|
|
||||||
makedepends = cmake
|
|
||||||
makedepends = git
|
|
||||||
makedepends = gcc
|
|
||||||
source = git+https://git.alfieking.dev/acetheking987/term-owo-cpp.git
|
|
||||||
md5sums = SKIP
|
|
||||||
|
|
||||||
pkgname = term-owo-git
|
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -32,4 +32,5 @@
|
|||||||
*.out
|
*.out
|
||||||
*.app
|
*.app
|
||||||
|
|
||||||
|
# Build files
|
||||||
build/
|
build/
|
7
.vscode/settings.json
vendored
7
.vscode/settings.json
vendored
@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
"files.associations": {
|
|
||||||
"*.pyw": "python",
|
|
||||||
"string": "cpp",
|
|
||||||
"ostream": "cpp"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.5)
|
|
||||||
find_program(CMAKE_C_COMPILER NAMES $ENV{CC} gcc PATHS ENV PATH NO_DEFAULT_PATH)
|
|
||||||
find_program(CMAKE_CXX_COMPILER NAMES $ENV{CXX} g++ PATHS ENV PATH NO_DEFAULT_PATH)
|
|
||||||
project(owo)
|
|
||||||
add_executable(owo src/main.cpp)
|
|
||||||
target_link_libraries(owo)
|
|
||||||
|
|
@ -33,10 +33,11 @@ $ ./owo -c "Hello, world!"
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
to build the program, run the following command:
|
to build the program, you will need a c++ compiler. I have no idea what im doing with cmake so this uses a very basic make file that is made to build the linux and windows binaries.
|
||||||
|
If you are on windows, good luck. I have no clue how to setup g++ on windows. I would recommend using WSL or a VM. If you are on linux, you can build the program with the following commands
|
||||||
|
(assuming you have g++ installed):
|
||||||
```bash
|
```bash
|
||||||
$ cmake . -B build
|
$ make
|
||||||
$ cd build && make
|
|
||||||
$ ./owo "Hello, world!"
|
$ ./owo "Hello, world!"
|
||||||
hewwo, wowld!
|
hewwo, wowld!
|
||||||
```
|
```
|
||||||
|
19
makefile
Normal file
19
makefile
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
all: dirs build_unix
|
||||||
|
|
||||||
|
dirs:
|
||||||
|
@mkdir -p build/
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@rm -rf build/
|
||||||
|
|
||||||
|
build_all: build_unix build_win
|
||||||
|
|
||||||
|
build_unix:
|
||||||
|
@echo "Building for unix..."
|
||||||
|
g++ -o build/owo src/main.cpp
|
||||||
|
|
||||||
|
build_win:
|
||||||
|
@echo "Building for windows..."
|
||||||
|
x86_64-w64-mingw32-g++ -o build/owo.exe src/main.cpp
|
||||||
|
|
||||||
|
.PHONY: all dirs clean build_all build_unix build_win
|
Loading…
Reference in New Issue
Block a user