Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
Makefile: Add minimal C compiler warning flags
Browse files Browse the repository at this point in the history
  • Loading branch information
erikd committed Jun 10, 2016
1 parent 53bbcd7 commit d0837f4
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ RANLIB = /usr/bin/ranlib
CC = gcc
#CC = cc

# Enable compiler warnings. This is ab absolute minimum.
CFLAGS += -Wall -Wextra

# Define your optimization flags. Most compilers understand -O and -O2,
# Standard (note: Solaris on UltraSparc using gcc 2.8.x might not like this.)
#
Expand Down Expand Up @@ -224,19 +227,19 @@ all: $(NAME) d$(NAME)
.SUFFIXES: .c .o .h

$(COMMON_OBJECT): %.o: %.c
$(CC) $(OPTS) $(COMMON_DEFS) -o $@ -c $<
$(CC) $(CFLAGS) $(OPTS) $(COMMON_DEFS) -o $@ -c $<

$(BLORB_OBJECT): %.o: %.c
$(CC) $(OPTS) -o $@ -c $<
$(CC) $(CFLAGS) $(OPTS) -o $@ -c $<

$(DUMB_OBJECT): %.o: %.c
$(CC) $(OPTS) -o $@ -c $<
$(CC) $(CFLAGS) $(OPTS) -o $@ -c $<

$(CURSES_OBJECT): %.o: %.c
$(CC) $(OPTS) $(CURSES_DEFS) $(INCL) -o $@ -c $<
$(CC) $(CFLAGS) $(OPTS) $(CURSES_DEFS) $(INCL) -o $@ -c $<

$(SDL_OBJECT): %.o: %.c
$(CC) $(OPTS) $(SDL_DEFS) $(INCL) -o $@ -c $<
$(CC) $(CFLAGS) $(OPTS) $(SDL_DEFS) $(INCL) -o $@ -c $<


# If you're going to make this target manually, you'd better know which
Expand Down

0 comments on commit d0837f4

Please sign in to comment.