Skip to content

Commit

Permalink
fix make file from dumb thing (#14)
Browse files Browse the repository at this point in the history
* fix make file from dumb thing

* fixed warning from journal.c

* disable ncurse to disable the warnings about missing symbols

* add lib variation in makefile

---------

Co-authored-by: Lucy Ada Randall <Lucy Brown>
  • Loading branch information
anoraktrend authored Jun 10, 2024
1 parent 62a00e1 commit 2f0c48b
Show file tree
Hide file tree
Showing 7 changed files with 124 additions and 9 deletions.
58 changes: 58 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Prerequisites
*.d
aee
ee

# Object files
*.o
*.ko
*.obj
*.elf

# Linker output
*.ilk
*.map
*.exp

# Precompiled Headers
*.gch
*.pch

# Libraries
*.lib
*.a
*.la
*.lo

# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib

# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex

# Debug files
*.dSYM/
*.su
*.idb
*.pdb

# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf
ee
aee

# End of https://mrkandreev.name/snippets/gitignore-generator/#C
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "ee-fbsd"]
path = ee-fbsd
url = https://github.com/anoraktrend/ee-fbsd
19 changes: 12 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
DEFINES = -DSYS5 -DBSD_SELECT -DNCURSE -DHAS_UNISTD -DHAS_STDLIB -DHAS_CTYPE -DHAS_SYS_IOCTL -DHAS_SYS_WAIT -DHAS_UNISTD -DHAS_STDARG -DHAS_STDLIB -DHAS_SYS_WAIT -DSLCT_HDR
DEFINES = -DSYS5 -DBSD_SELECT -DHAS_NCURSES -DHAS_UNISTD -DHAS_STDLIB -DHAS_CTYPE -DHAS_SYS_IOCTL -DHAS_SYS_WAIT -DHAS_UNISTD -DHAS_STDARG -DHAS_STDLIB -DHAS_SYS_WAIT -DSLCT_HDR

CFLAGS= -Ofast -march=native -mtune=native -flto -fcommon -s
CFLAGS= -O0 -march=native -mtune=native -flto -fcommon -lcurses

LDFLAGS= -s

main : ncurses

Expand All @@ -12,20 +14,23 @@ uninstall : clean
clean :
rm -f *.o aee ane xae_dir/*.o

all : ncurses new_curse
all : ncurses cursedee

CC = clang

OBJS = aee.o control.o format.o localize.o srch_rep.o delete.o mark.o new_curse.o motion.o keys.o help.o windows.o journal.o file.o
OBJS = aee.o control.o format.o localize.o srch_rep.o delete.o mark.o motion.o keys.o help.o windows.o journal.o file.o

.c.o:
$(CC) $(DEFINES) -c $*.c $(CFLAGS)

ncurses : $(OBJS)
$(CC) -o aee $(OBJS) $(CFLAGS) $(LDFLAGS) -DHAS_NCURSES -lncursesw
$(CC) -o aee $(OBJS) $(CFLAGS) $(LDFLAGS)

cursedee :
make -f makefile.ee.newcurse.lib

curses : $(OBJS)
$(CC) -o aee $(OBJS) $(CFLAGS) $(LDFLAGS) -DCURSES -lncursesw
aeelib :
make -f makefile.newcurse.lib

aee.o: aee.c aee.h new_curse.h aee_version.h
control.o: control.c new_curse.h aee.h
Expand Down
Binary file added cursedee
Binary file not shown.
1 change: 1 addition & 0 deletions ee-fbsd
Submodule ee-fbsd added at 9e20e6
4 changes: 2 additions & 2 deletions journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ char *file_name;
| Unable to open journal file.
*/

buffer->journ_fd = '-1';
buffer->journ_fd = '1';
return(1);
}

Expand Down Expand Up @@ -861,7 +861,7 @@ struct bufr *buffer;
{
wprintw(com_win, cant_opn_rcvr_fil_msg);
buffer->journalling = FALSE;
buffer->journ_fd = '-1';
buffer->journ_fd = '1';
return;
}

Expand Down
48 changes: 48 additions & 0 deletions makefile.ee.newcurse.lib
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
DEFINES = -DSYS5 -DBSD_SELECT -DNCURSE -DHAS_UNISTD -DHAS_STDLIB -DHAS_CTYPE -DHAS_SYS_IOCTL -DHAS_SYS_WAIT -DHAS_UNISTD -DHAS_STDARG -DHAS_STDLIB -DHAS_SYS_WAIT -DSLCT_HDR

CFLAGS= -O0 -march=native -mtune=native -flto -fcommon

LDFLAGS= -s -lcurses -fuse-ld=lld

main : eelonk

install : main
@./install-sh

uninstall : clean
@./uninstall-sh
clean :
rm -f *.o aee *.a xae_dir/*.o

all : ncurses new_curse

CC = clang

OBJS = new_curse.o control.o format.o localize.o srch_rep.o delete.o mark.o motion.o keys.o help.o windows.o journal.o file.o

.c.o:
$(CC) $(DEFINES) -c $*.c $(CFLAGS)

ee.o:
$(CC) $(DEFINES) -c ./ee-fbsd/ee.c $(CFLAGS)

libnewcurse : $(OBJS)
llvm-ar rcs newcurse.a $(OBJS)

eelonk : libnewcurse ee.o
$(CC) -o cursedee newcurse.a -lm ee.o $(CFLAGS) $(LDFLAGS)

aee.o: aee.c aee.h new_curse.h aee_version.h
control.o: control.c new_curse.h aee.h
delete.o: delete.c new_curse.h aee.h
format.o: format.c new_curse.h aee.h
help.o: help.c new_curse.h aee.h
journal.o: journal.c new_curse.h aee.h
windows.o: windows.c new_curse.h aee.h
file.o: file.c new_curse.h aee.h
keys.o: keys.c new_curse.h aee.h
localize.o: localize.c new_curse.h aee.h
mark.o: mark.c new_curse.h aee.h
motion.o: motion.c new_curse.h aee.h
srch_rep.o: srch_rep.c new_curse.h aee.h
new_curse.o: new_curse.c new_curse.h

0 comments on commit 2f0c48b

Please sign in to comment.