Reorganizing.

This commit is contained in:
Adam Cozzette 2011-09-20 01:31:35 -07:00
parent 75cc992bca
commit 38e830a79d
5 changed files with 16 additions and 9 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
*.swp
*.o
abuse_example

View File

@ -1,15 +1,15 @@
TARGET := abuse_example
OBJS := $(TARGET:=.o)
OBJS := $(TARGET:=.o) abuse.o
C := /usr/bin/gcc
CFLAGS := -g -pedantic -Wall -Wextra -std=c99 -I$(HOME)/local/include -I$(HOME)/src/nbd
LDFLAGS := -lz
LDFLAGS :=
.PHONY: all clean
all: $(TARGET) abuse.h
all: $(TARGET)
$(TARGET): %: %.o
$(CC) $(LDFLAGS) -o $@ $<
$(TARGET): $(OBJS) abuse.h
$(CC) $(LDFLAGS) -o $@ $^
$(OBJS): %.o: %.c
$(CC) $(CFLAGS) -o $@ -c $<

View File

@ -1,6 +1,4 @@
#include "abuse.h"
int main()
int abuse_main()
{
return abuse_main();
return 0;
}

View File

@ -9,4 +9,6 @@ struct abuse_operations {
void (*trim)();
};
int abuse_main();
#endif /* ABUSE_H_INCLUDED */

6
abuse_example.c Normal file
View File

@ -0,0 +1,6 @@
#include "abuse.h"
int main()
{
return abuse_main();
}