Some more Makefile updates
This commit is contained in:
@ -2,7 +2,6 @@
|
|||||||
# This Makefile contains instructions common to all platforms
|
# This Makefile contains instructions common to all platforms
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Build rules
|
# Build rules
|
||||||
#
|
#
|
||||||
@ -23,4 +22,4 @@ libsam: $(OBJS)
|
|||||||
#
|
#
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-$(RM) -f $(LIBDIR)/libsam.a $(OBJDIR)/* .depend
|
-$(RM) -f $(LIBDIR)/libsam.a $(OBJDIR)/*.o .depend
|
||||||
|
@ -1,34 +0,0 @@
|
|||||||
#
|
|
||||||
# This Makefile is compatible with GNU Make
|
|
||||||
#
|
|
||||||
|
|
||||||
#
|
|
||||||
# Programs
|
|
||||||
#
|
|
||||||
|
|
||||||
CC = gcc
|
|
||||||
|
|
||||||
#
|
|
||||||
# Flags
|
|
||||||
#
|
|
||||||
|
|
||||||
CFLAGS = -g -O2 -pipe -std=c99 -Wall
|
|
||||||
CFLAGS += -I../inc -L../lib
|
|
||||||
LIBS = -lsam
|
|
||||||
|
|
||||||
#
|
|
||||||
# Build rules
|
|
||||||
#
|
|
||||||
|
|
||||||
all: warhammer-dgram
|
|
||||||
|
|
||||||
warhammer-dgram: warhammer-dgram.c
|
|
||||||
$(CC) $(CFLAGS) -o warhammer-dgram.o -c warhammer-dgram.c
|
|
||||||
$(CC) $(CFLAGS) -o warhammer-dgram warhammer-dgram.o $(LIBS)
|
|
||||||
|
|
||||||
#
|
|
||||||
# Cleanup rules
|
|
||||||
#
|
|
||||||
|
|
||||||
clean:
|
|
||||||
-rm -f *.o *.exe warhammer-dgram
|
|
20
apps/sam/c/examples/Makefile.common
Normal file
20
apps/sam/c/examples/Makefile.common
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#
|
||||||
|
# This Makefile contains instructions common to all platforms
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# Build rules
|
||||||
|
#
|
||||||
|
|
||||||
|
all: clean warhammer-dgram
|
||||||
|
|
||||||
|
warhammer-dgram: warhammer-dgram.c
|
||||||
|
$(CC) $(CFLAGS) -o warhammer-dgram.o -c warhammer-dgram.c
|
||||||
|
$(CC) $(CFLAGS) -o warhammer-dgram warhammer-dgram.o $(LIBS)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Cleanup rules
|
||||||
|
#
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-$(RM) -f warhammer-dgram *.exe *.o
|
@ -7,6 +7,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
CC = C:\Dev-Cpp\bin\gcc
|
CC = C:\Dev-Cpp\bin\gcc
|
||||||
|
RM = C:\Dev-Cpp\bin\rm
|
||||||
|
|
||||||
#
|
#
|
||||||
# Flags
|
# Flags
|
||||||
@ -18,18 +19,7 @@ CFLAGS += -I../inc -L../lib
|
|||||||
LIBS = -lsam -lwsock32
|
LIBS = -lsam -lwsock32
|
||||||
|
|
||||||
#
|
#
|
||||||
# Build rules
|
# Include the make instructions common to all platforms
|
||||||
#
|
#
|
||||||
|
|
||||||
all: warhammer-dgram
|
include Makefile.common
|
||||||
|
|
||||||
warhammer-dgram:
|
|
||||||
$(CC) $(CFLAGS) -o warhammer-dgram.o -c warhammer-dgram.c
|
|
||||||
$(CC) $(CFLAGS) -o warhammer-dgram warhammer-dgram.o $(LIBS)
|
|
||||||
|
|
||||||
#
|
|
||||||
# Cleanup rules
|
|
||||||
#
|
|
||||||
|
|
||||||
clean:
|
|
||||||
-rm -f *.o *.exe warhammer-dgram
|
|
||||||
|
24
apps/sam/c/examples/Makefile.posix
Normal file
24
apps/sam/c/examples/Makefile.posix
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#
|
||||||
|
# This Makefile is compatible with GNU Make and should work on POSIX systems
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# Programs
|
||||||
|
#
|
||||||
|
|
||||||
|
CC = gcc
|
||||||
|
RM = rm
|
||||||
|
|
||||||
|
#
|
||||||
|
# Flags
|
||||||
|
#
|
||||||
|
|
||||||
|
CFLAGS = -g -O2 -pipe -std=c99 -Wall
|
||||||
|
CFLAGS += -I../inc -L../lib
|
||||||
|
LIBS = -lsam
|
||||||
|
|
||||||
|
#
|
||||||
|
# Include the make instructions common to all platforms
|
||||||
|
#
|
||||||
|
|
||||||
|
include Makefile.common
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# This Makefile is compatible with GNU Make
|
# This Makefile is compatible with GNU Make and should work on POSIX systems
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
INSTALL = install
|
INSTALL = install
|
||||||
|
RM = rm
|
||||||
|
|
||||||
#
|
#
|
||||||
# Flags
|
# Flags
|
||||||
@ -21,7 +22,7 @@ LIBS = -lsam
|
|||||||
# Build rules
|
# Build rules
|
||||||
#
|
#
|
||||||
|
|
||||||
all: i2p-ping
|
all: clean i2p-ping
|
||||||
|
|
||||||
i2p-ping: i2p-ping.c
|
i2p-ping: i2p-ping.c
|
||||||
$(CC) $(CFLAGS) -o i2p-ping.o -c i2p-ping.c
|
$(CC) $(CFLAGS) -o i2p-ping.o -c i2p-ping.c
|
||||||
@ -35,4 +36,4 @@ install: i2p-ping
|
|||||||
#
|
#
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-rm -f *.o *.exe i2p-ping
|
-$(RM) -f i2p-ping *.o
|
||||||
|
Reference in New Issue
Block a user