Skip to content

Commit

Permalink
make BSD's make work, 2nd try
Browse files Browse the repository at this point in the history
  • Loading branch information
esmil committed Apr 22, 2009
1 parent 49e52d4 commit cba970a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
12 changes: 10 additions & 2 deletions BSDmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA

.include Makefile
.include "Makefile"

CC ?= cc
CFLAGS ?= -O2 -Wall
Expand Down Expand Up @@ -52,4 +52,12 @@ DEFINES += -DDEBUG

OBJS = $(SRCS:.c=.o)

.include rules.mk
all: $(program)

.SUFFIXES: .o .c
.c.o:
$(CC) $(CFLAGS) $(DEFINES) -DVERSION="\"$(version)\"" -c $(.IMPSRC)

$(OBJS): $(HEADERS)

.include "rules.mk"
5 changes: 5 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,9 @@ endif

OBJS = $(SRCS:.c=.o)

all: $(program)

%.o: %.c $(HEADERS)
$(CC) $(CFLAGS) $(DEFINES) -DVERSION="\"$(version)\"" -c $<

include rules.mk
7 changes: 1 addition & 6 deletions rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA

.PHONY: all strip indent clean install uninstall

all: $(program)

%.o : %.c $(HEADERS)
$(CC) $(CFLAGS) $(DEFINES) -DVERSION="\"$(version)\"" -c $<
.PHONY: strip indent clean install uninstall

$(program): $(OBJS)
$(CC) $(CFLAGS) $(OBJS) -o $(program) $(LDFLAGS) $(LIBS)
Expand Down

0 comments on commit cba970a

Please sign in to comment.