Linker flags and makefile cleanup
This commit is contained in:
parent
a5c5ecd64b
commit
2886a81574
1 changed files with 4 additions and 5 deletions
9
Makefile
9
Makefile
|
@ -14,10 +14,9 @@ CFLAGS += -fshort-enums
|
||||||
else
|
else
|
||||||
CFLAGS += -g -O0 -std=c99 -march=native -mtune=native
|
CFLAGS += -g -O0 -std=c99 -march=native -mtune=native
|
||||||
CFLAGS += -DDEBUG
|
CFLAGS += -DDEBUG
|
||||||
endif
|
endif # DEBUG
|
||||||
|
|
||||||
# Include debug flags
|
LDFLAGS = -lm
|
||||||
CFLAGS += -g -O0 -std=c99 -march=native -mtune=native
|
|
||||||
|
|
||||||
C_SOURCES = $(wildcard *.c)
|
C_SOURCES = $(wildcard *.c)
|
||||||
C_HEADERS = $(wildcard *.h)
|
C_HEADERS = $(wildcard *.h)
|
||||||
|
@ -35,7 +34,7 @@ all: $(OBJECTS)
|
||||||
@$(CC) $(CFLAGS) -S -masm=intel $<
|
@$(CC) $(CFLAGS) -S -masm=intel $<
|
||||||
|
|
||||||
driver: $(OBJECTS)
|
driver: $(OBJECTS)
|
||||||
@$(CC) $(CFLAGS) $^ -o $@
|
@$(CC) $(LDFLAGS) $^ -o $@
|
||||||
|
|
||||||
run: driver
|
run: driver
|
||||||
@./driver
|
@./driver
|
||||||
|
@ -44,7 +43,7 @@ lib: $(OBJECTS)
|
||||||
@ar rcs librbuf.a ringbuf.o
|
@ar rcs librbuf.a ringbuf.o
|
||||||
|
|
||||||
dylib: $(OBJECTS)
|
dylib: $(OBJECTS)
|
||||||
@$(CC) $(CFLAGS) -fPIC -shared -o librbuf.so ringbuf.o
|
@$(CC) $(LDLAGS) -fPIC -shared -o librbuf.so ringbuf.o
|
||||||
|
|
||||||
install:
|
install:
|
||||||
@cp librbuf.a /usr/local/lib
|
@cp librbuf.a /usr/local/lib
|
||||||
|
|
Loading…
Reference in a new issue