Reorganizing.
This commit is contained in:
parent
75cc992bca
commit
38e830a79d
|
@ -1,2 +1,3 @@
|
|||
*.swp
|
||||
*.o
|
||||
abuse_example
|
||||
|
|
10
Makefile
10
Makefile
|
@ -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 $<
|
||||
|
|
6
abuse.c
6
abuse.c
|
@ -1,6 +1,4 @@
|
|||
#include "abuse.h"
|
||||
|
||||
int main()
|
||||
int abuse_main()
|
||||
{
|
||||
return abuse_main();
|
||||
return 0;
|
||||
}
|
||||
|
|
2
abuse.h
2
abuse.h
|
@ -9,4 +9,6 @@ struct abuse_operations {
|
|||
void (*trim)();
|
||||
};
|
||||
|
||||
int abuse_main();
|
||||
|
||||
#endif /* ABUSE_H_INCLUDED */
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#include "abuse.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
return abuse_main();
|
||||
}
|
Loading…
Reference in New Issue