Skip to content

Commit 89d38c8

Browse files
committed
GNUmakefile: prevent build failure when ncurses headers are installed
apparently some parts of libterminfo use curses headers, and it was reported that its build fails when ncurses headers are installed systemwide, unless -I./libcurses is used (in which case our internal headers take precedence). closes sabotage-linux#30
1 parent a9ad9c2 commit 89d38c8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

GNUmakefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,9 @@ tic/%.o: tic/%.c
400400
libcurses/%.o: libcurses/%.c
401401
$(CC) $(CPPFLAGS) -I./libcurses $(CFLAGS) -c -o $@ $<
402402

403+
libterminfo/%.o: libterminfo/%.c
404+
$(CC) $(CPPFLAGS) -I./libcurses $(CFLAGS) -c -o $@ $<
405+
403406
libmenu/%.o: libmenu/%.c
404407
$(CC) $(CPPFLAGS) -I./libcurses -I./libmenu $(CFLAGS) -c -o $@ $<
405408

@@ -410,6 +413,7 @@ libform/%.o: libform/%.c
410413
$(CC) $(CPPFLAGS) -I./libcurses -I./libmenu -I./libform $(CFLAGS) -c -o $@ $<
411414

412415
ifeq ($(ALLPIC),1)
416+
413417
$(CU_LOBJS): $(CU_OBJS)
414418
libcurses/%.lo: libcurses/%.o
415419
$(LN) -sf $(notdir $<) $@
@@ -434,7 +438,7 @@ libcurses/%.lo: libcurses/%.c
434438
$(CC) $(CPPFLAGS) -I./libcurses $(CFLAGS) $(PIC) -c -o $@ $<
435439

436440
libterminfo/%.lo: libterminfo/%.c
437-
$(CC) $(CPPFLAGS) $(CFLAGS) $(PIC) -c -o $@ $<
441+
$(CC) $(CPPFLAGS) -I./libcurses $(CFLAGS) $(PIC) -c -o $@ $<
438442

439443
libpanel/%.lo: libpanel/%.c
440444
$(CC) $(CPPFLAGS) -I./libcurses -I./libpanel $(CFLAGS) $(PIC) -c -o $@ $<

0 commit comments

Comments
 (0)