CONFIGURE YAYY BETTER BUILD METHODS lslsls! ANYTHING BUT WRITING ACTUAL CODElslslslslslslslslslslslslslslsls

This commit is contained in:
david committed 2026-07-24 18:40:14 -03:00
1 parent d64804517b
commit 9e5372a6db
5 files changed
+4767 -4

No files matched your search

+3
View File
@@ -1,2 +1,5 @@
petratc
obj/
config.log
config.status
autom4te.cache/
+6 -2
View File
@@ -1,7 +1,8 @@
CC = gcc
CC = @CC@
CFLAGS = -Wall -Wextra -O2 -pipe
LDLIBS = -lncurses
LDLIBS = @CURSES_LIB@
TARGET = petratc
CONF = configure configure~ config.log config.status Makefile autom4te.cache/
SRC = petratc.c rat.c $(wildcard games/*.c)
OBJ = $(SRC:%.c=obj/%.o)
PREFIX = /usr/local
@@ -21,3 +22,6 @@ obj/%.o: %.c
clean:
rm -f $(TARGET) $(OBJ)
bigclean:
rm -rf $(TARGET) $(OBJ) $(CONF)
+12 -2
View File
@@ -2,11 +2,21 @@
# installing:
```term
make && sudo make install
./confugure && make && sudo make install
```
also, you'll need `ncurses-devel` to compile it
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
Vendored Executable
+4722
View File
File diff suppressed because it is too large. Load diff
+24
View File
@@ -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