Browse Source

Do not include c sources

master
Florian Obser 12 months ago
parent
commit
5b3dc1dd02
  1. 10
      Makefile
  2. 4
      main.c
  3. 2
      mimes.c
  4. 1
      mimes.h

10
Makefile

@ -3,11 +3,11 @@ PREFIX?=/usr/local/
all: vger
clean:
rm -f vger *.core
vger: main.c
${CC} -o vger main.c
rm -f vger *.core *.o
vger: main.o mimes.o
${CC} -o vger main.o mimes.o
install: vger
install -o root -g wheel vger ${PREFIX}/bin/
install -o root -g wheel vger.8 ${PREFIX}/man/man8/

4
main.c

@ -8,7 +8,8 @@
#include <sys/stat.h>
#include <syslog.h>
#include <unistd.h>
#include "mimes.c"
#include "mimes.h"
#define BUFF_LEN_1 1000
#define BUFF_LEN_2 1025
@ -20,7 +21,6 @@
void display_file(const char *, const char *);
void status (const int, const char *, const char *);
void get_file_mime(const char *, char *, const ssize_t);
void drop_privileges(const char *, const char *);
int main (int, char **);

2
mimes.c

@ -2,7 +2,7 @@
#include <unistd.h>
#include <string.h>
void get_file_mime(const char *, char *, const ssize_t);
#include "mimes.h"
struct mimes {
char extension[10];

1
mimes.h

@ -0,0 +1 @@
void get_file_mime(const char *, char *, const ssize_t);
Loading…
Cancel
Save