mirror of
https://git.squeakyrat.moe/petratc/
synced 2026-11-05 02:45:43 +01:00
CONFIGURE YAYY BETTER BUILD METHODS lslsls! ANYTHING BUT WRITING ACTUAL CODElslslslslslslslslslslslslslslsls
This commit is contained in:
1 parent
d64804517b
commit
9e5372a6db
5 files changed
+4767
-4
No files matched your search
@@ -1,2 +1,5 @@
|
|||||||
petratc
|
petratc
|
||||||
obj/
|
obj/
|
||||||
|
config.log
|
||||||
|
config.status
|
||||||
|
autom4te.cache/
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
CC = gcc
|
CC = @CC@
|
||||||
CFLAGS = -Wall -Wextra -O2 -pipe
|
CFLAGS = -Wall -Wextra -O2 -pipe
|
||||||
LDLIBS = -lncurses
|
LDLIBS = @CURSES_LIB@
|
||||||
TARGET = petratc
|
TARGET = petratc
|
||||||
|
CONF = configure configure~ config.log config.status Makefile autom4te.cache/
|
||||||
SRC = petratc.c rat.c $(wildcard games/*.c)
|
SRC = petratc.c rat.c $(wildcard games/*.c)
|
||||||
OBJ = $(SRC:%.c=obj/%.o)
|
OBJ = $(SRC:%.c=obj/%.o)
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
@@ -21,3 +22,6 @@ obj/%.o: %.c
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(TARGET) $(OBJ)
|
rm -f $(TARGET) $(OBJ)
|
||||||
|
|
||||||
|
bigclean:
|
||||||
|
rm -rf $(TARGET) $(OBJ) $(CONF)
|
||||||
@@ -2,11 +2,21 @@
|
|||||||
|
|
||||||
# installing:
|
# installing:
|
||||||
```term
|
```term
|
||||||
make && sudo make install
|
./confugure && make && sudo make install
|
||||||
```
|
```
|
||||||
also, you'll need `ncurses-devel` to compile it
|
also, you'll need `ncurses-devel` to compile it
|
||||||
|
|
||||||
that's pretty much it lol
|
that's pretty much it lol
|
||||||
|
|
||||||
you have no clue what sudo is? check the [wiki](https://github.com/davideldios7/petratc/wiki) out!
|
# IF IT FAILS
|
||||||
|
if for whatever reason `./configure` fails try running this
|
||||||
|
```term
|
||||||
|
make bigclean && autoconf && ./configure && make
|
||||||
|
```
|
||||||
|
you will need autoconf installed though
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# you have no clue what sudo is? check the [wiki](https://github.com/davideldios7/petratc/wiki) out!
|
||||||
|
|
||||||
# if someone wants to make a game please make a pull request i don't know how to code
|
# if someone wants to make a game please make a pull request i don't know how to code
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,24 @@
|
|||||||
|
AC_INIT([petratc], [1.0])
|
||||||
|
AC_CONFIG_SRCDIR([petratc.c])
|
||||||
|
AC_PROG_CC
|
||||||
|
|
||||||
|
#what if i have pdcurses or just curses and not ncurses idk
|
||||||
|
#this will be useful only when i decide to port it to widnows
|
||||||
|
CURSES_LIB=""
|
||||||
|
AC_CHECK_LIB([ncursesw], [initscr], [CURSES_LIB="-lncursesw"])
|
||||||
|
AS_IF([test "x$CURSES_LIB" = "x"],
|
||||||
|
[AC_CHECK_LIB([ncurses], [initscr], [CURSES_LIB="-lncurses"])])
|
||||||
|
AS_IF([test "x$CURSES_LIB" = "x"],
|
||||||
|
[AC_CHECK_LIB([curses], [initscr], [CURSES_LIB="-lcurses"])])
|
||||||
|
AS_IF([test "x$CURSES_LIB" = "x"],
|
||||||
|
[AC_CHECK_LIB([pdcurses], [initscr], [CURSES_LIB="-lpdcurses"])])
|
||||||
|
AS_IF([test "x$CURSES_LIB" = "x"],
|
||||||
|
[AC_MSG_ERROR([no curses library found (tried ncursesw, ncurses, curses, pdcurses)])])
|
||||||
|
|
||||||
|
#in mac having -ltinfo in your makefile gives you a linker error
|
||||||
|
#whereas in linux you need it
|
||||||
|
AC_CHECK_LIB([tinfo], [setupterm], [CURSES_LIB="$CURSES_LIB -ltinfo"])
|
||||||
|
|
||||||
|
AC_SUBST([CURSES_LIB])
|
||||||
|
AC_CONFIG_FILES([Makefile])
|
||||||
|
AC_OUTPUT
|
||||||
Reference in new issue
Block a user